layer

Function layer 

Source
pub fn layer<S>(
    service_name: impl Into<Value>,
) -> OpenTelemetryLayer<S, SdkTracer>
where for<'span> S: Subscriber + LookupSpan<'span>,
Expand description

Creates a tracing OpenTelemetryLayer that exports spans to an OTLP endpoint.

This layer can be added to a [tracing_subscriber::Registry] to enable OpenTelemetry tracing with OTLP export.