Expand description
ComponentMetrics โ lever-gated facade for the uniform
component-operations family (dashboard-observability Task 4.1).
Components call ComponentMetrics::observe at their principal
operation boundary. The facade owns two concerns so individual
components do not:
- Lever gating: the
[observability.metrics].componentslever (default off, metrics-configuration Req 3) suppresses only thecamel_component_operations_totalfamily. - Unconditional error forwarding: failures always increment the
non-disableable error family (
camel_errors_total) asincrement_errors(component, "e:{component}:{operation}")โ never lever-gated (metrics-configuration Req 2).
The lever arrives as a plain bool because camel-api cannot depend
on camel-core, where MetricsLeversConfig lives: the construction
site (camel-core, via the RuntimeObservability blanket impl)
snapshots the current levers into the facade at build time.
Structsยง
- Component
Metrics - Facade over a
MetricsCollectorfor uniform component-operation emission. Construct viaRuntimeObservability::component_metrics()or directly in tests.