Metricscpp is a c++ library for sending metrics data in a time series databases. It makes easier to collect data from inside of your applications about critical parts of the execution.
Create the metrics connector object using database's api url as the input parameter
auto metrics = metricspp::MetricsConnector("http://influx.example.com:8086/write?db=test");
and you are ready to go! Now you can send your data via this object:
std::queue<...> data_queue;
...
metrics << "queue" << data_queue.size();
More examples you can find in examples folder.
To simple build the library you need to run:
cmake .
make
Additionaly, if you want to build example applications, you can pass BUILD_EXAMPLE option to cmake
- C++11
- CMake >= 3.1
- Curl
Metricspp is distributed under the MIT License. See LICENSE file for details.