![]() |
Monitoring
3.3.4
O2 Monitoring library
|
Main class that collects metrics from user and dispatches them to selected monitoring backends. More...
#include <Monitoring.h>
Public Member Functions | |
| Monitoring & | operator= (const Monitoring &)=delete |
| Disable copy constructor. | |
| Monitoring (const Monitoring &)=delete | |
| Disable copy constructor. | |
| Monitoring () | |
| Instantiates derived metrics processor (see DerivedMetrics) and process monitor (seeProcessMonitor). | |
| void | addBackend (std::unique_ptr< Backend > backend) |
| Creates and appends backend to the backend list. | |
| ~Monitoring () | |
| Joins process monitor thread if possible. | |
| void | send (Metric &&metric, DerivedMetricMode mode=DerivedMetricMode::NONE) |
| void | enableProcessMonitoring (const unsigned int interval=5) |
| void | flushBuffer () |
| Flushes metric buffer (this can also happen when buffer is full) | |
| void | enableBuffering (const std::size_t size=128) |
| void | addGlobalTag (std::string_view name, std::string_view value) |
| void | addGlobalTag (tags::Key key, tags::Value value) |
Main class that collects metrics from user and dispatches them to selected monitoring backends.
Collects user-defined metrics (seeMetric class) and pushes them through all selected backends (seeBackend). Calculates derived metrics such as rate and increment value (seeDerivedMetrics class). Adds default tags to each metric: proces name, hostname (seeProcessDetails class) Monitors the process itself - including memory, cpu and network usage (seeProcessMonitor class).
| void o2::monitoring::Monitoring::addGlobalTag | ( | std::string_view | name, |
| std::string_view | value | ||
| ) |
Adds global tag
| name | tag name |
| value | tag value |
| void o2::monitoring::Monitoring::addGlobalTag | ( | tags::Key | key, |
| tags::Value | value | ||
| ) |
Adds global tag
| name | tag name |
| value | tag value |
| void o2::monitoring::Monitoring::enableBuffering | ( | const std::size_t | size = 128 | ) |
Enables metric buffering
| size | buffer size |
| void o2::monitoring::Monitoring::enableProcessMonitoring | ( | const unsigned int | interval = 5 | ) |
Enables process monitoring
| interval | refresh interval |
| void o2::monitoring::Monitoring::send | ( | Metric && | metric, |
| DerivedMetricMode | mode = DerivedMetricMode::NONE |
||
| ) |
Sends a metric to all avaliabes backends If DerivedMetricMode is specified it generates and sends derived metric
| metric | r-value to metric object |
| mode | Derived metric mode |