Skip to main content

Module EmitOTLPSpan

Module EmitOTLPSpan 

Source
Expand description

Fire-and-forget OTLP span exporter. Sends a single resourceSpans payload over plain HTTP to the collector at OTLPEndpoint (default 127.0.0.1:4318, configurable via .env.Land.PostHog). Stops trying after the first failure (OTLP_AVAILABLE flips to false) so a missing collector doesnโ€™t tax every IPC call. Release builds are compiled out via cfg!(debug_assertions). Honors the Capture master telemetry kill switch and the per-pipe OTLPEnabled toggle.

Staticsยง

OTLP_AVAILABLE ๐Ÿ”’
OTLP_TRACE_ID ๐Ÿ”’

Functionsยง

Fn
GetTraceId ๐Ÿ”’
ParseEndpoint ๐Ÿ”’
Split http://host:port/path into (host:port, /path). Defaults the path to /v1/traces when the endpoint has none. Returns owned Strings so the spawned thread does not borrow the build-time &'static str.
RandU64 ๐Ÿ”’