Skip to main content

Module export

Module export 

Source
Expand description

Native OTLP export of the runtime’s spans.

Configuration comes entirely from the standard OpenTelemetry environment variables, so every host that embeds core gets the same behavior by adding layer to its subscriber and calling shutdown_best_effort after the runtime has drained. Core never installs a subscriber itself; which log layers surround the span layer is the host’s decision.

Functions§

layer
Builds the span layer when standard OTel environment variables opt in, or nothing when they do not. The layer only sees the runtime’s own spans, so a host’s log filters do not decide what gets exported.
shutdown_best_effort
Terminates the process-global trace provider after runtime work has drained. Export failures are logged because telemetry must not affect runtime shutdown.