-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Clarify attributes also use regex #31496
Clarify attributes also use regex #31496
Conversation
42f8b4b
to
4ada4be
Compare
I looked into this a bit, the attributes referred to here are coming from here. There's a comment that states only Because of this, I believe the comments are simply out of date and we should update the documentation as you're doing. 👍 |
4ada4be
to
13634e5
Compare
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.
Thank you!
…nality (#31517) Context: #31496 (comment) I believe strict matching was originally the only supported option for attributes, and regex was added shortly after. I believe this comment was missed with the update, so it's out of date. Refer to the referenced comment above for more context and references.
Disclaimer: I didn't actually manage find the place in the code where this happens, so please pump the brakes if this is off-base/wrong. The description of `match_type` for `regexp` does not mention attributes, but the [example config in the tests](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/attributesprocessor/testdata/config.yaml#L303) looks like it uses regexp. This could lead a user to think that regex cannot be used for attribute values when reading the docs here. The docs around the attribute value also indicated "exact", which could lead a user to believe that regex wasn't supported.
…nality (open-telemetry#31517) Context: open-telemetry#31496 (comment) I believe strict matching was originally the only supported option for attributes, and regex was added shortly after. I believe this comment was missed with the update, so it's out of date. Refer to the referenced comment above for more context and references.
Disclaimer: I didn't actually manage find the place in the code where this happens, so please pump the brakes if this is off-base/wrong. The description of `match_type` for `regexp` does not mention attributes, but the [example config in the tests](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/attributesprocessor/testdata/config.yaml#L303) looks like it uses regexp. This could lead a user to think that regex cannot be used for attribute values when reading the docs here. The docs around the attribute value also indicated "exact", which could lead a user to believe that regex wasn't supported.
Disclaimer: I didn't actually manage find the place in the code where this happens, so please pump the brakes if this is off-base/wrong.
The description of
match_type
forregexp
does not mention attributes, but the example config in the tests looks like it uses regexp. This could lead a user to think that regex cannot be used for attribute values when reading the docs here.The docs around the attribute value also indicated "exact", which could lead a user to believe that regex wasn't supported.