Expand description
ComponentMetrics โ component-scoped facade for the uniform
component-operations family.
Each handle fixes its component identity at construction; call sites only supply the operation and outcome. The facade owns two concerns so individual components do not:
- Lever gating: the effective per-component switch
(
ComponentMetricsLevers::enabled_for) 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).
ComponentMetricsLevers is the effective per-component switch
snapshot. It arrives pre-resolved 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 handle at build time.
Structsยง
- Component
Metrics - Facade over a
MetricsCollectorfor uniform component-operation emission. Construct viaRuntimeObservability::component_metrics(component)or directly in tests. - Component
Metrics Levers - Effective per-component switch snapshot for the uniform component-operations family.