Closed
Description
Hi, I have started testing OpenTelemetry integration and I found the example given here really useful: https://github.com/awslabs/aws-lambda-rust-runtime/blob/main/examples/opentelemetry-tracing/src/lib.rs
I have copied the code into my project but I am wondering if it could be packaged into the distributed crate, maybe behind an opentelemetry feature flag?
I have also tried using nested layers and I would expect this to create child spans but this is not what I am observing. Is this a feature or a bug?
Given this setup I would expect the span of Tracing-layer to be a child of the OpenTelemetry-layer span:
let runtime = Runtime::new(handler)
.layer(layers::TracingLayer::new())
.layer(OpenTelemetryLayer::new(|| {
tracer
.provider()
.expect("Unable to get tracer provider!")
.force_flush();
}));
Metadata
Metadata
Assignees
Labels
No labels