-
Notifications
You must be signed in to change notification settings - Fork 352
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 baggageItemToTag filter #1160
Conversation
Signed-off-by: Aditya Pratap Singh <[email protected]>
@addityasingh thanks for the PR, can you please also add something in the documentation? |
Signed-off-by: Aditya Pratap Singh <[email protected]>
👍 |
1 similar comment
👍 |
@@ -1528,3 +1528,17 @@ directory, but it won't walk subtrees. For the example case, there | |||
have to be filenames `write-token` and `read-token` within the | |||
specified credential paths `/tmp/secrets/`, resulting in | |||
`/tmp/secrets/write-token` and `/tmp/secrets/read-token`. | |||
|
|||
## baggageItemToTag |
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.
Is baggage
a general term used in OpenTracing? Just looking at the filter name baggageItemToTag
I had no idea it had anything to do with OpenTracing but maybe it's just a convention that I'm not familiar with?
It's documented so I can learn that it's an OpenTracing thing but ideally filter names should be somewhat descriptive on their own.
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.
See https://godoc.org/github.com/opentracing/opentracing-go#Span it’s a member of this interface
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.
Baggage is indeed a term used in opentracing to represent information valid throughout the process boundaries, unlike Span or Logs https://opentracing.io/docs/overview/tags-logs-baggage/
thx @mikkeloscar . I think I get your concern. From Skipper's perspective it may not be necessary clear, what kind of 'baggage' this suppose to be. My suggestion now is to rename it to: |
@aryzska that is even more weird to me. |
IMO the name is self explanatory if we consider that BaggageItem and Tags are part of the core components of opentracing(https://opentracing.io/docs/overview/tags-logs-baggage/) |
I agree, but maybe we should link in our docs to the opentracing docs |
I'm late to this party. For consistency, it probably would've been better to prefix with |
Thanks I understand now that there were some meaningful reason behind the name in the context of open tracing, however I would still argue that we should avoid using such names in a "global" namespace of filter names. It's not unlikely that other parts of the system could have similar terminology internally as OpenTracing. I agree with @lmineiro that having it prefixed with |
prefixing was my intention, too, while keeping it short. Maybe a good name would be: |
Cool. I will update the name and create a PR later today with |
@mikkeloscar This PR(#1168) addresses the renaming |
Implementation allows single argument variant which is used in the wild so document it. Follow up on #1160 and #1168 Signed-off-by: Alexander Yastrebov <[email protected]>
Implementation allows single argument variant which is used in the wild so document it. Follow up on #1160 and #1168 Signed-off-by: Alexander Yastrebov <[email protected]>
Implementation allows single argument variant which is used in the wild so document it. Follow up on #1160 and #1168 Signed-off-by: Alexander Yastrebov <[email protected]>
Implementation allows single argument variant which is used in the wild so document it. Follow up on #1160 and #1168 Signed-off-by: Alexander Yastrebov <[email protected]>
Add baggageItemToTag filter
This filter adds an opentracing tag for a given baggage item in the trace.
Syntax:
Example: If a trace consists of baggage item named
foo
with a valuebar
. Adding below filter will add a tag namedbaz
with valuebar