-
Notifications
You must be signed in to change notification settings - Fork 590
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
config: add support for configuring propagators #6727
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6727 +/- ##
=======================================
- Coverage 74.5% 74.5% -0.1%
=======================================
Files 199 200 +1
Lines 17529 17551 +22
=======================================
+ Hits 13075 13091 +16
- Misses 4070 4074 +4
- Partials 384 386 +2
|
Changelog entry is missing. |
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.
Thanks for taking on this work @jpkrohling! Added a couple of comments
config/v0.3.0/propagation.go
Outdated
return propagation.NewCompositeTextMapPropagator(ps...), nil | ||
} | ||
|
||
func propagatorByName(name string) (propagation.TextMapPropagator, error) { |
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.
It might be possible to simplify the code here by using the autoprop
package
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.
Given the second reviewer says the same I think this could be addressed
Reference: #6727 (comment)
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.
Done! I'm not sure the current code justifies a new function and new source file. On the other hand, it's aligned with how things are done for similar constructs. I think I prefer this way, but I don't have strong opinions.
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
3448a6c
to
1440ce9
Compare
Note: I changed a couple of things in autoprop, to account for two edge cases: an empty input, which IMO should have the same behavior as if the value wasn't specified), and an empty value, which IMO should be skipped. |
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Signed-off-by: Juraci Paixão Kröhling <[email protected]>
Fixes #6712