Summary
Update metric_reporter to publish metrics via EventBus instead of direct monitoring_system dependency.
Parent Issue
Depends On
Files to Modify
src/metrics/network_metrics.cpp
include/kcenon/network/metrics/network_metrics.h
Implementation Approach
- Remove
#if KCENON_WITH_MONITORING_SYSTEM guards
- Use common_system's EventBus to publish NetworkMetricEvent
- Maintain backward compatibility with existing
metric_reporter API
Example
void metric_reporter::report_connection_accepted() {
auto& bus = kcenon::common::get_event_bus();
bus.publish(events::NetworkMetricEvent{
metric_names::CONNECTIONS_TOTAL, 1.0,
{{"event", "accepted"}}
});
}
Acceptance Criteria
Summary
Update
metric_reporterto publish metrics via EventBus instead of direct monitoring_system dependency.Parent Issue
Depends On
Files to Modify
src/metrics/network_metrics.cppinclude/kcenon/network/metrics/network_metrics.hImplementation Approach
#if KCENON_WITH_MONITORING_SYSTEMguardsmetric_reporterAPIExample
Acceptance Criteria