-
Notifications
You must be signed in to change notification settings - Fork 120
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Bug description
I'm running request-tracing with opentelemetry_0_31 flag and doing pure OTel tracing so far. But I struggle to get outgoing requests properly annotated with a trace id.
To Reproduce
let tracer = global::tracer("foobar");
let url = format!("{service_url}/endpoint");
tracer.in_span("fetch_foo", async |_cx| {
let client = ClientBuilder::new(reqwest::Client::new())
.with(TracingMiddleware::default())
.build();
let response = client.get(&url)...
});Expected behavior
OTel headers should be injected into the HTTP headers, but none to be found.
Environment
Linux & Mac
Additional context
I debugged into otel.rs - fn inject_opentelemetry_context_into_request and noticed that call to
let context = Span::current().context();yields a None span. Span references the tracing package, which is not configured in my case. So I wonder if the tracing package is actually a hard requirement?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working