Common System 0.2.0
Common interfaces and patterns for system integration
Loading...
Searching...
No Matches
metric_collector_interface.h File Reference

Unified metric collection interface for cross-module metric reporting. More...

#include <chrono>
#include <memory>
#include <string>
#include <string_view>
#include <unordered_map>
Include dependency graph for metric_collector_interface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

interface  kcenon::common::interfaces::IMetricCollector
 Abstract interface for collecting metrics across modules. More...
 
class  kcenon::common::interfaces::scoped_timer
 RAII helper for automatic timing measurements. More...
 
class  kcenon::common::interfaces::null_metric_collector
 No-op implementation for when metrics are disabled. More...
 
interface  kcenon::common::interfaces::IMetricCollectorProvider
 Interface for modules that provide metric collector implementations. More...
 

Namespaces

namespace  kcenon
 
namespace  kcenon::common
 Core interfaces.
 
namespace  kcenon::common::interfaces
 

Typedefs

using kcenon::common::interfaces::MetricCollectorFactory = std::function<std::shared_ptr<IMetricCollector>()>
 Factory function type for creating metric collector instances.
 

Detailed Description

Unified metric collection interface for cross-module metric reporting.

This header defines the IMetricCollector interface that enables clean metric reporting across the ecosystem without requiring direct monitoring_system dependencies. It complements the existing IMonitor interface:

  • IMonitor: Pull-based (read status, get snapshots)
  • IMetricCollector: Push-based (emit metrics in real-time)
See also
monitoring_interface.h for IMonitor details

Definition in file metric_collector_interface.h.