API Reference otel v#0.2.0

Copy Markdown View Source

Modules

OTel Baggage (spec baggage/api.md, Status: Stable).

W3C Baggage percent-encoding codec (W3C Baggage spec §value L64-L69, §property L82-L100).

Macro module injecting shared OTel type aliases into consumer modules.

OTel Context (spec context/README.md, Status: Stable).

A logical unit of software identified by (name, version, schema_url, attributes) that emits telemetry (spec common/instrumentation-scope.md, Status: Stable).

Shared types for the OTel Logs API data model (logs/data-model.md §Severity Fields L234-L363).

LogRecord data model (logs/data-model.md §"Log and Event Record Definition" L155-L451; Status: Stable).

Logger behaviour and dispatch facade (OTel logs/api.md §Logger L99-L155; Status: Stable — inherits the file-level Stable from logs/api.md L9, no per-section carve-out remaining at v1.55.0).

No-op Logger implementation (OTel logs/noop.md §Logger, Status: Stable).

Global LoggerProvider registration and Logger retrieval (OTel logs/api.md §LoggerProvider, L54-L97).

Synchronous Counter instrument facade (OTel metrics/api.md §Counter, Status: Stable, L497-L598).

Synchronous Gauge instrument facade (OTel metrics/api.md §Gauge, Status: Stable, L828-L916).

Synchronous Histogram instrument facade (OTel metrics/api.md §Histogram, Status: Stable, L735-L827).

Instrument handle (OTel metrics/api.md §Instrument, Status: Stable, L178-L278).

A single numeric data point reported to the SDK (OTel metrics/api.md §Measurement, Status: Stable, L1278-L1287).

Meter behaviour and dispatch facade (OTel metrics/api.md §Meter, Status: Stable, L157-L176).

No-op Meter implementation (OTel metrics/noop.md §Meter, Status: Stable, L84-L266).

Global MeterProvider registration and Meter retrieval (OTel metrics/api.md §MeterProvider, Status: Stable, L106-L155).

Asynchronous Counter instrument facade (OTel metrics/api.md §Asynchronous Counter, Status: Stable, L599-L733).

Asynchronous Gauge instrument facade (OTel metrics/api.md §Asynchronous Gauge, Status: Stable, L917-L1031).

Asynchronous UpDownCounter instrument facade (OTel metrics/api.md §Asynchronous UpDownCounter, Status: Stable, L1158-L1277).

Synchronous UpDownCounter instrument facade (OTel metrics/api.md §UpDownCounter, Status: Stable, L1032-L1157).

TextMapPropagator behaviour and global facade (OTel context/api-propagators.md §TextMap Propagator L114-L203; §Global Propagators L308-L346).

W3C Baggage propagator (W3C HTTP_HEADER_FORMAT.md §Header Content L19-L113; OTel context/api-propagators.md §TextMap Inject/Extract L155-L203).

Composite TextMap propagator (OTel context/api-propagators.md §Composite Propagator, L259-L305).

No-op TextMap propagator used when no propagator is explicitly configured (spec context/api-propagators.md L322-L325, Status: Stable).

W3C Trace Context Level 2 propagator (W3C 20-http_request_header_format.md §Traceparent Header L51-L244; OTel context/api-propagators.md §TextMap L114-L203).

Trace API facade — TracerProvider, Context Interaction, and Span Creation entry points (OTel trace/api.md §TracerProvider L88-L157, §Context Interaction L159-L183, §Span Creation L378-L414).

A timestamped event recorded on a Span (spec trace/api.md §Add Events, Status: Stable, L520-L558).

A link from the current Span to another SpanContext (spec trace/api.md §Link, Status: Stable, L803-L834).

Span operations facade (OTel trace/api.md §Span operations L449-L705; Status: Stable).

No-op Span operations implementation (OTel trace/api.md §"Behavior of the API in the absence of an installed SDK", L860-L874, Status: Stable).

Immutable context of a Span (spec trace/api.md §SpanContext, Status: Stable, L221-L278).

Opaque 64-bit Span identifier (W3C parent-id / OTel trace/api.md §SpanContext SpanId, L234-L235).

SpanKind — clarifies the relationship between Spans (spec trace/api.md §SpanKind, Status: Stable).

A Span's Status (spec trace/api.md §Set Status, Status: Stable).

Opaque 128-bit Trace identifier (W3C trace-id / OTel trace/api.md §SpanContext TraceId, L231-L232).

W3C Trace Context tracestate field (spec §3.3).

Tracer behaviour (spec trace/api.md §Tracer, Status: Stable, L184-L219).

No-op Tracer used when no SDK is installed (spec trace/api.md §Behavior of the API in the absence of an installed SDK, L860-L874, Status: Stable).

Global TracerProvider registration and Tracer retrieval (OTel trace/api.md §TracerProvider, L88-L157).

Declarative configuration for the OpenTelemetry Elixir SDK (OTEL_CONFIG_FILE).

Composes a validated declarative-config in-memory model into the per-pillar provider config maps that Otel.SDK.{Trace.TracerProvider, Metrics.MeterProvider, Logs.LoggerProvider} consume at start_link/1.

YAML → in-memory term parser for declarative configuration files (OTEL_CONFIG_FILE).

JSON Schema validation of post-substitution declarative configuration models against the opentelemetry-configuration v1.0.0 schema.

Environment variable substitution for declarative configuration files (OTEL_CONFIG_FILE).

Bridges Erlang's :logger to the OpenTelemetry Logs API (OTel logs/api.md + logs/supplementary-guidelines.md §How to Create a Log4J Log Appender).

OTLP exporter for OpenTelemetry.

Retry wrapper around :httpc.request/4 for OTLP/HTTP exporters.

OTLP HTTP Exporter for logs.

OTLP HTTP Exporter for metrics.

OTLP HTTP Exporter for traces.

OpenTelemetry SDK for Elixir.

Composes provider configuration from three layers, in precedence order from highest to lowest

Spec-compliant typed reads of OTEL_* environment variables.

Atom-name → canonical {module, config} normalization for SDK configuration values.

Centralised one-shot exporter initialisation.

SDK-side ReadWriteLogRecord (logs/sdk.md §ReadWriteLogRecord L298-L319 + §ReadableLogRecord L277-L296).

Behaviour for log record exporters (logs/sdk.md §LogRecordExporter L549-L645 + §Concurrency requirements L647-L660).

Standard-output LogRecordExporter for debugging (logs/sdk_exporters/stdout.md).

Configurable limits for Otel.API.Logs.LogRecord attribute collections (logs/sdk.md §LogRecord Limits L321-348).

Behaviour for log record processors (logs/sdk.md §LogRecordProcessor L350-L503).

Batching LogRecordProcessor (logs/sdk.md §Batching processor L528-L548).

Simple LogRecordProcessor (logs/sdk.md §Simple processor L514-L526).

SDK implementation of the Otel.API.Logs.Logger behaviour (logs/sdk.md §Logger).

SDK implementation of the LoggerProvider.

Aggregation behaviour and default instrument-to-aggregation mapping (metrics/sdk.md §Aggregation L612-L860).

Base2 Exponential Bucket Histogram aggregation (metrics/sdk.md §Base2 Exponential Bucket Histogram Aggregation L670-L760, Status: Stable, v1.55.0).

Drop aggregation. Ignores all measurements.

Explicit bucket histogram aggregation.

Last value aggregation. Keeps the most recent measurement.

Sum aggregation. Collects the arithmetic sum of measurements.

An Exemplar is a recorded measurement that links metric data to trace context. Exemplars are sampled from measurements by ExemplarReservoirs and attached to metric data points during collection.

Exemplar filters determine whether a measurement should be considered for exemplar sampling.

ExemplarReservoir behaviour. A reservoir samples and stores exemplars from offered measurements, then returns them during collection.

A reservoir aligned with explicit histogram bucket boundaries.

A reservoir that uses uniformly-weighted random sampling.

SDK implementation of the Otel.API.Metrics.Meter behaviour (metrics/sdk.md §Meter L870-L943).

SDK implementation of the Otel.API.Metrics.MeterProvider behaviour (metrics/sdk.md §MeterProvider L43-L155).

Behaviour for push metric exporters.

Console exporter for metrics debugging.

Behaviour for bridging third-party metric sources into the OpenTelemetry metrics pipeline.

MetricReader behaviour and collection pipeline.

A MetricReader that periodically collects metrics and exports them via a configured exporter.

A metric stream produced by matching a View to an Instrument.

Instrument selection criteria + stream configuration (metrics/sdk.md §View L259-L327).

Immutable representation of the entity producing telemetry (resource/sdk.md §"SDK").

SDK-internal representation of a Span Event.

Behaviour for trace ID and span ID generation.

Default ID generator using Erlang's :rand.uniform/1.

SDK-internal representation of a Span Link.

Sampler behaviour and dispatch (trace/sdk.md §Sampler L329-L460).

Sampler that always drops.

Sampler that always records and samples.

Sampler decorator that delegates based on parent span state.

Sampler that samples a configured ratio of traces.

SDK implementation of the Otel.API.Trace.Span behaviour (trace/sdk.md §Span L692-L944) — data + lifecycle operations.

Behaviour for span exporters (trace/sdk.md §Span Exporter L1120-L1209).

Console exporter for debugging and learning purposes.

Configurable limits for Span data.

Behaviour for span processors (trace/sdk.md §SpanProcessor L946-L1075).

BatchSpanProcessor that accumulates spans and exports in batches (trace/sdk.md §Batching processor L1086-L1118).

SimpleSpanProcessor that exports each span immediately on end (trace/sdk.md §Simple processor L1076-L1084).

ETS-backed storage for active spans.

SDK implementation of the Otel.API.Trace.Tracer behaviour (trace/sdk.md §Tracer L120-L228).

SDK implementation of the Otel.API.Trace.TracerProvider behaviour (trace/sdk.md §TracerProvider L36-L116).