Skip to main content

Module component_metrics

Module component_metrics 

Source
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 the camel_component_operations_total family.
  • Unconditional error forwarding: failures always increment the non-disableable error family (camel_errors_total) as increment_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ยง

ComponentMetrics
Facade over a MetricsCollector for uniform component-operation emission. Construct via RuntimeObservability::component_metrics(component) or directly in tests.
ComponentMetricsLevers
Effective per-component switch snapshot for the uniform component-operations family.