| 16 | { |
| 17 | |
| 18 | MetricsTransmitter::MetricsTransmitter( |
| 19 | const Poco::Util::AbstractConfiguration & config, const std::string & config_name_, const AsynchronousMetrics & async_metrics_) |
| 20 | : async_metrics(async_metrics_), config_name(config_name_) |
| 21 | { |
| 22 | interval_seconds = config.getInt(config_name + ".interval", 60); |
| 23 | send_events = config.getBool(config_name + ".events", true); |
| 24 | send_events_cumulative = config.getBool(config_name + ".events_cumulative", false); |
| 25 | send_metrics = config.getBool(config_name + ".metrics", true); |
| 26 | send_asynchronous_metrics = config.getBool(config_name + ".asynchronous_metrics", true); |
| 27 | |
| 28 | thread = ThreadFromGlobalPool{&MetricsTransmitter::run, this}; |
| 29 | } |
| 30 | |
| 31 | |
| 32 | MetricsTransmitter::~MetricsTransmitter() |