[Bug]: opentelemetry-appender-tracing
(with experimental_use_tracing_span_context
enabled) + axum-tracing-opentelemetry
integration issue
#2803
Labels
What happened?
opentelemetry-appender-tracing
(withexperimental_use_tracing_span_context
enabled #2438) failed to exporttrace_id
when ingerating with withaxum-tracing-opentelemetry
's middlewares.Context: I wanted to integrate my
loco-rs
app withaxum-tracing-opentelemetry
to get more telemetry data out of request & response. I followed the example inloco-extras
(it's outdated at the moment), and managed to get it working. However when the middlewares fromaxum-tracing-opentelemetry
are added,trace_id
is no longer being exported.Minimal repo with steps to reproduce the issue: https://github.com/Rudo2204/loco_otel_integration_issue (please read the steps in README file)
I don't think there is a problem with
opentelemetry-appender-tracing
, rather it likely has something to do withtracing-opentelemetry-instrumentation-sdk
creating a new span and settingtrace_id
totracing::field::Empty
? They seem to use a hack to get thetrace_id
from handler if needed.OpenTelemetry API Version (i.e version of
opentelemetry
crate)0.28.0
OpenTelemetry SDK Version (i.e version of
opentelemetry_sdk
crate)0.28.0
What Exporter(s) are you seeing the problem on?
OTLP
Relevant log output
The text was updated successfully, but these errors were encountered: