Skip to main content

Module telemetry

Module telemetry 

Source
Expand description

Tracing. Encore records its spans and metrics through its own tracer provider and meter provider, never the opentelemetry globals, which the runtime leaves to the app: pass the providers to instrumentation libraries, or install them as the globals. Infra calls parent their spans on opentelemetry::Context::current. Logs print through crate::log.

ⓘ
use encore::opentelemetry::global;

global::set_tracer_provider(encore::telemetry::tracer_provider());
global::set_meter_provider(encore::metrics::meter_provider());

Structs§

Tracer
An OTel Tracer recording into a Pipeline under one instrumentation scope. Cheap to clone.
TracerProvider
Encore’s tracer provider, an OpenTelemetry TracerProvider recording into the runtime’s telemetry pipeline. Cheap to clone.

Functions§

parse_traceparent
Parses a W3C traceparent header value and an optional tracestate into a remote span context. None for malformed input.
tracer
A Tracer recording into Encore’s pipeline with instrumentation scope name.
tracer_provider
Encore’s tracer provider.