OtelBridge (otel_bridge v0.1.0)

Copy Markdown View Source

Bridges Telemetry.Metrics definitions into OpenTelemetry metrics.

The public API stays intentionally small:

  • callers define metric spec modules implementing OtelBridge.Spec
  • callers optionally attach observer children for gauge-like metrics
  • backend policy is selected via OtelBridge.Profile modules

Summary

Types

option()

@type option() ::
  {:metrics, [Telemetry.Metrics.t()]}
  | {:specs, [module()]}
  | {:optional_specs, [module()]}
  | {:measurements, [module() | {module(), atom(), [term()]}]}
  | {:meta, keyword()}
  | {:poller, keyword()}
  | {:observer_children, [Supervisor.child_spec()]}

Functions

child_spec(opts)

@spec child_spec([option()]) :: Supervisor.child_spec()

metric_reader!(profile, opts)

@spec metric_reader!(
  OtelBridge.Profile.profile_ref(),
  keyword()
) :: map()

prepare_metrics(metrics)

@spec prepare_metrics([Telemetry.Metrics.t()]) :: [Telemetry.Metrics.t()]

start_link(opts)

@spec start_link([option()]) :: Supervisor.on_start()