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
Tracerrecording into aPipelineunder one instrumentation scope. Cheap to clone. - Tracer
Provider - Encore’s tracer provider, an OpenTelemetry
TracerProviderrecording into the runtime’s telemetry pipeline. Cheap to clone.
Functions§
- parse_
traceparent - Parses a W3C
traceparentheader value and an optionaltracestateinto a remote span context.Nonefor malformed input. - tracer
- A
Tracerrecording into Encore’s pipeline with instrumentation scopename. - tracer_
provider - Encore’s tracer provider.