-
I have setup my app in a way that it can be instrumented with let tracer = init_tracer().unwrap();
tracing_subscriber::registry()
.with(tracing_subscriber::EnvFilter::new(
std::env::var("RUST_LOG").unwrap_or_else(|_| "myapp=info,tower_http=info".into()),
))
.with(tracing_subscriber::fmt::layer())
.with(tracing_opentelemetry::layer().with_tracer(tracer))
.init(); My router ..
.layer(opentelemetry_tracing_layer())
.layer(init_session_layer())
.layer(TraceLayer::new_for_http()); However the web api calls do not end up in my tracing suite. I am also lacking of the general understanding if there is a need for the thx for any clarification |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
axum doesn't have any |
Beta Was this translation helpful? Give feedback.
-
I am just struggling to get it working, see davidB/tracing-opentelemetry-instrumentation-sdk#44. |
Beta Was this translation helpful? Give feedback.
opentelemetry_tracing_layer
(axum_tracing_opentelemetry::middleware::trace_extractor
) comes from theaxum-tracing-opentelemetry
crate. It internally adds theTraceLayer::new_for_http()
.I am just struggling to get it working, see davidB/tracing-opentelemetry-instrumentation-sdk#44.