What happened?
opentelemetry-appender-tracing (with experimental_use_tracing_span_context enabled #2438) failed to export trace_id when ingerating with with axum-tracing-opentelemetry's middlewares.
Context: I wanted to integrate my loco-rs app with axum-tracing-opentelemetry to get more telemetry data out of request & response. I followed the example in loco-extras (it's outdated at the moment), and managed to get it working. However when the middlewares from axum-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 with
tracing-opentelemetry-instrumentation-sdk creating a new span and setting trace_id to tracing::field::Empty? They seem to use a hack to get the trace_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