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
When we record custom attributes, the intent is to record them on the span representing the current Django request, Celery task, or other service-entry span. Our use of ddtrace.tracer.current_root_span() was intended to implement that, but it turns out this can return a span from outside the current service/process if the trace started in another service.
This could mean that if service A calls service B, attributes meant for the Django request in B are attached to the one in A, possibly overwriting values there.
Acceptance criteria:
DatadogBackend.set_attribute attaches to the service entry span, not the trace root span
Closing out -- I think we're actually OK, and the docs are just confusing. I've updated DataDog/dd-trace-py#9758 to be about clarifying the documentation. We can reopen if it turns out I was wrong.
When we record custom attributes, the intent is to record them on the span representing the current Django request, Celery task, or other service-entry span. Our use of
ddtrace.tracer.current_root_span()
was intended to implement that, but it turns out this can return a span from outside the current service/process if the trace started in another service.This could mean that if service A calls service B, attributes meant for the Django request in B are attached to the one in A, possibly overwriting values there.
Acceptance criteria:
DatadogBackend.set_attribute
attaches to the service entry span, not the trace root spanImplementation notes:
(Note that this compounds with the trace concatenation issue -- attributes get attached to the initial trace that all the others get concatenated to.)
The text was updated successfully, but these errors were encountered: