-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ddtrace/tracer: setup GLS-stored context #2761
Changes from 7 commits
52b09e6
14bb855
ee9f9e1
c6fd1c1
c9f5b4b
c674507
222de37
b33d2bf
c82c374
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,6 +29,7 @@ import ( | |
sharedinternal "gopkg.in/DataDog/dd-trace-go.v1/internal" | ||
"gopkg.in/DataDog/dd-trace-go.v1/internal/globalconfig" | ||
"gopkg.in/DataDog/dd-trace-go.v1/internal/log" | ||
"gopkg.in/DataDog/dd-trace-go.v1/internal/orchestrion" | ||
"gopkg.in/DataDog/dd-trace-go.v1/internal/samplernames" | ||
"gopkg.in/DataDog/dd-trace-go.v1/internal/traceprof" | ||
|
||
|
@@ -503,6 +504,7 @@ func (s *span) Finish(opts ...ddtrace.FinishOption) { | |
} | ||
|
||
s.finish(t) | ||
orchestrion.GLSPopValue(sharedinternal.ActiveSpanKey) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What happens if a span finishes before its children? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see a case where this could happen in the same goroutine. 🤔 In a multiple goroutine setup where the parent ends in another gouroutine this is a real issue that is not taken care of today. We definitively need a kind of cross goroutine GLS in the future |
||
} | ||
|
||
// SetOperationName sets or changes the operation name. | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did we pass
nil
instead ofspan
to this func before, and why are we changing it now?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed a parameter to the function
StartRequestOperation
because we always passednil
as a second argument to it. Romain also noted this here