You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unfortunately, with the current implementation, it is not possible to associate traces with logs when using tracing-opentelemetry. For more details, please refer to this issue
From what I have investigated, when opentelemetry_sdk generates logs, it looks for the trace_id from the active span, but it references opentelemetry's Context during this process. However, tracing manages its own Context (active span), and opentelemetry does not take tracing's context into account.
One developer has published an example of the necessary implementation. As shown in the example, a logic that allows opentelemetry to reference tracing's span is needed.
Bug Report
The logs created via the OpenTelemetry bridge do not seem to get their
trace_id
andspan_id
fields set based on the currently-active span.Version
My
Cargo.toml
:Platform
Mac OS X
Description
In the following, the Log should have additionally the
TraceId: d260f7f85b4f5e5c6bfc651318c16b66
andSpanId: a47bb75086adb5cf
fields set.This is the code that generates the output above:
The text was updated successfully, but these errors were encountered: