OtelBridge.Bridge (otel_bridge v0.1.2)

Copy Markdown View Source

Runtime process that records telemetry events as OpenTelemetry metrics.

Most applications should use OtelBridge instead of starting this module directly.

This module:

  1. receives prepared Telemetry.Metrics definitions
  2. creates matching OpenTelemetry instruments
  3. attaches telemetry handlers for each event name
  4. records incoming measurements into those instruments

Summary

Functions

Returns a specification to start this module under a supervisor.

Telemetry event handler that records measurements into OpenTelemetry instruments.

Starts the bridge process for a set of metric definitions.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

handle_event(event_name, measurements, metadata, map)

Telemetry event handler that records measurements into OpenTelemetry instruments.

For each configured metric, the handler:

  • checks whether the metric should be kept for the current metadata
  • extracts the measurement value
  • derives the exported tags
  • records the value into the created instrument

start_link(opts)

Starts the bridge process for a set of metric definitions.