feat(interfaces): add unified metric collection interface (IMetricCollector)#236
Merged
Merged
Conversation
…ollection Add IMetricCollector interface to enable cross-module metric reporting without requiring direct monitoring_system dependencies. - Add IMetricCollector interface with counter/gauge/histogram/timing methods - Add scoped_timer RAII helper for automatic timing measurements - Add null_metric_collector for disabled metrics scenarios - Add IMetricCollectorProvider for dependency injection support - Add monitoring.h umbrella header This complements the existing IMonitor interface: - IMonitor: Pull-based (read status, get snapshots) - IMetricCollector: Push-based (emit metrics in real-time) Resolves #234
Add comprehensive test coverage for the new metric collector interface: - MockMetricCollector for testing metric emissions - Tests for counter, gauge, histogram, and timing metrics - Tests for metric labels functionality - Tests for scoped_timer RAII behavior - Tests for null_metric_collector no-op implementation - Polymorphism tests for interface contracts All 31 tests passing. Related to #234
Add documentation for the unified metric collection interface in both English and Korean CHANGELOG files.
kcenon
added a commit
that referenced
this pull request
Apr 13, 2026
…lector) (#236) * feat(interfaces): add IMetricCollector interface for unified metric collection Add IMetricCollector interface to enable cross-module metric reporting without requiring direct monitoring_system dependencies. - Add IMetricCollector interface with counter/gauge/histogram/timing methods - Add scoped_timer RAII helper for automatic timing measurements - Add null_metric_collector for disabled metrics scenarios - Add IMetricCollectorProvider for dependency injection support - Add monitoring.h umbrella header This complements the existing IMonitor interface: - IMonitor: Pull-based (read status, get snapshots) - IMetricCollector: Push-based (emit metrics in real-time) Resolves #234 * test(interfaces): add unit tests for IMetricCollector interface Add comprehensive test coverage for the new metric collector interface: - MockMetricCollector for testing metric emissions - Tests for counter, gauge, histogram, and timing metrics - Tests for metric labels functionality - Tests for scoped_timer RAII behavior - Tests for null_metric_collector no-op implementation - Polymorphism tests for interface contracts All 31 tests passing. Related to #234 * docs: update CHANGELOG for IMetricCollector interface Add documentation for the unified metric collection interface in both English and Korean CHANGELOG files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
IMetricCollectorinterface for cross-module metric reporting without direct monitoring_system dependenciesscoped_timerRAII helper for automatic timing measurementsnull_metric_collectorfor disabled metrics scenariosIMetricCollectorProviderfor dependency injection supportmonitoring.humbrella header and comprehensive unit tests (31 tests)Changes
include/.../monitoring/metric_collector_interface.hinclude/.../monitoring.htests/metric_collector_interface_test.cpptests/CMakeLists.txtdocs/CHANGELOG.mddocs/CHANGELOG_KO.mdInterface Design
Relationship with Existing IMonitor
IMonitor: Pull-based (read status, get snapshots)IMetricCollector: Push-based (emit metrics in real-time)Both interfaces complement each other in the monitoring ecosystem.
Test Plan
Downstream Impact
Resolves #234
Part of Epic #232 (Cross-Module Circular Dependency Resolution)