Skip to main content

Module telemetry

Module telemetry 

Source
Expand description

Application-owned telemetry APIs.

Use tracing to compose Encore’s tracing layers, or log to install Encore’s direct logger for the standard log facade. These are separate logging paths; choose one. The tracing bridge forwards log records to the tracing subscriber; it does not forward tracing events to log.

Metrics remain SDK-owned; pass crate::metrics::meter_provider directly to instrumentation libraries. The SDK does not enable tracing/log.

Entered tracing spans activate their OpenTelemetry context for Encore resources and other OTel instrumentation, restoring the prior context on exit. Use tracing::Instrument for futures; never hold an enter guard over an await. Explicit tracing parents and OpenTelemetrySpanExt::set_parent are supported. Native OTel contexts nested inside a tracing span take precedence until detached.

Modules§

http
Server spans for HTTP handlers.
log
Encore integrations for the standard log facade.
tracing
Encore’s tracing subscriber layers.

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.