Skip to content

[chore] 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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jaysonsantos
Copy link

@jaysonsantos jaysonsantos commented Apr 8, 2025

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

@github-actions github-actions bot requested a review from kentquirk April 8, 2025 14:50
@jaysonsantos jaysonsantos force-pushed the ottl-add-keys-function branch from 9f3ae35 to b6ad3b8 Compare April 8, 2025 14:56
@jaysonsantos jaysonsantos changed the title Add a new ottl function Keys [chore] Add a new ottl function Keys Apr 8, 2025
@jaysonsantos jaysonsantos force-pushed the ottl-add-keys-function branch 4 times, most recently from 05667c6 to 0ae2462 Compare April 8, 2025 20:04
@jaysonsantos jaysonsantos force-pushed the ottl-add-keys-function branch from 0ae2462 to fa791ee Compare April 8, 2025 20:10
Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants