pub fn span_layer<S>(
service_name: impl Into<Value>,
endpoint: &Url,
protocol: OtlpProtocol,
) -> Result<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 to an url.