Otel.SDK.Trace.SpanProcessor.Batch (otel v0.2.0)

Copy Markdown View Source

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

Exports are triggered by a timer, queue size threshold, or force_flush. Uses a GenServer to serialize export calls (spec L1146-L1147 — "Export() should not be called concurrently with other Export calls for the same exporter instance").

Public API

FunctionRole
start_link/1SDK (lifecycle)
on_start/3, on_end/2, shutdown/1, force_flush/1SDK (Batch implementation)

References

  • OTel Trace SDK §Batching processor: opentelemetry-specification/specification/trace/sdk.md L1086-L1118
  • Parent behaviour: Otel.SDK.Trace.SpanProcessor

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(config)

@spec start_link(config :: Otel.SDK.Trace.SpanProcessor.config()) ::
  GenServer.on_start()