-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[pkg/ottl] Add a new ottl function Keys #39256
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
[pkg/ottl] Add a new ottl function Keys #39256
Conversation
9f3ae35
to
b6ad3b8
Compare
0ae2462
to
fa791ee
Compare
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
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 for you contribution, @jaysonsantos. I've left a few comments for your consideration. We also gonna need a change log for this PR.
@edmocosta i did the requested changed, just left two other questions. |
Please rebase, so we can trigger the CI. Thanks! |
1035d7a
to
d9e806e
Compare
Co-authored-by: Edmo Vamerlatti Costa <[email protected]>
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
@atoulme the changes were addressed but the ci timed out |
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.
Hi @jaysonsantos, could you please add a change log for this function: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#adding-a-changelog-entry?
Co-authored-by: Edmo Vamerlatti Costa <[email protected]>
@edmocosta done |
@edmocosta i have another branch with the function values, should i get the learnings from this, apply, and tag you or let the system choose? |
Hi @jaysonsantos, we normally prefer to discuss new functions/converters through issues, it ensures the function is aligned with OTTL requirements/guidelines, and also avoid folks spending their time writing code that might not get accepted at the end. That said, ideally, raising an issue would be the next step for that values function you're proposing :) |
Co-authored-by: Edmo Vamerlatti Costa <[email protected]>
hi @edmocosta the label says it depends on me but. think it is all set, right? |
I'm sorry, I forgot to remove the label. @evan-bradley @TylerHelmuth could you please take a look at this? Thanks! |
Description
This adds a new ottl function called
Keys
The idea here is because, I have a use case to debug traces being sent to newrelic where some spans are being dropped because of the attribute's names (and they don't specify which). The final idea is to be able to filter out attributes that are bigger than the threshold specified by them and send to a log or something.
A next step would be some sort of filter function like
Filter(Keys(resource.attributes), Len(key) > 100)
An ugly implementation of the fiter can be seen here main...jaysonsantos:opentelemetry-collector-contrib:ottl-add-filter-function