-
Notifications
You must be signed in to change notification settings - Fork 180
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
feat!: Add baggage key predicate func to baggage span processor #990
feat!: Add baggage key predicate func to baggage span processor #990
Conversation
Ping @robbkidd @arielvalentin - please could you take a look? |
processor/baggage/lib/opentelemetry/processor/baggage/baggage_span_processor.rb
Show resolved
Hide resolved
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.
Co-authored-by: Mike Goldsmith <[email protected]>
Co-authored-by: Mike Goldsmith <[email protected]>
Co-authored-by: Mike Goldsmith <[email protected]>
d241844
to
f2064fe
Compare
Thanks for the updates @robbkidd - much appreciated. |
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.
Are there any cases where endusers may want to filter based on value as opposed to key alone?
If I were writing my own predicate I would likely want to reach for an implementation that uses Hash#slice
and have an explicit key list as well as potentially scrub attributes that I may be concerned has PII in it. I wouldn't be able to do that with the current implementation.
Of course the more flexibility we provide, the more likely it will be a foot gun, so take my comments there with a grain of salt.
rant: wouldn't it be nice for the SDK to have the same attribute processors as the OTel collector
In addition to that, since this predicate does not get applied to the active span, should we communicate that somewhere in docs?
I think if you're starting to reach for a way to scrub data, your needs are more complex than what this processor offers and you should consider creating you own. I think using the key is a nice middle ground of being aware & having some control of what's going into baggage and doing more complex / custom logic.
Yeah, I agree it's sometimes frustrating SDKs don't have all the same processors as the Collector. Although, then we'd need to maintain them in two places.
Sure, I can madd an extra bit to the description that newly added baggage entries are not automatically added to the active span. |
@MikeGoldsmith please update your branch, since I do not have permissions to do so and I will merge this once specs pass. |
Done - thanks @arielvalentin 🎉 |
Which problem is this PR solving?
Short description of the changes
ALLOW_ALL_BAGGAGE_KEYS
lambda that allows all keys