-
Notifications
You must be signed in to change notification settings - Fork 49
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
Span suppressor #174
Span suppressor #174
Conversation
Grpc has released the latest version 2 days ago, which may cause the CI failed. I will fix the issue as soon as possible in order to let you pass the CI. #173. Thanks for your PR! |
I 've fixed the latestdepth test. You can merge the main branch and trigger the CI again. |
|
@oliver-zhang You should run your tests together, the |
|
||
func (s *SpanKindSuppressor) StoreInContext(context context.Context, spanKind trace.SpanKind, span trace.Span) context.Context { | ||
spanSuppressor, exists := s.delegates[spanKind] | ||
if !exists { |
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.
The spankey should be stored into span rather than context. Sometimes users may not deliver the correct go context, at that time, the parentContext in ShouldSuppress
may be context.Background()
. When the parentContext is context.Background
, we will use GLS to fetch the parent context in this Go Routine, we can fetch the parent span and its attributes in GLS, so you should put the span key into span's attributes rather than the go context.
You can use the scope in span to get the span kind. All the scopes are listed in |
Still some errors in your ut, could you please fix them? |
fixed #125