Skip to content
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

Add new ParseBytes OTTL function #35296

Closed
wants to merge 6 commits into from

Conversation

jdeff
Copy link

@jdeff jdeff commented Sep 19, 2024

Description:

Add a new OTTL function for parsing a humanized string representation of a byte size into an integer number of bytes. This allows us to use the transformprocessor to convert log lines from Heroku which contain metrics in the form of "sample#memory-total=123MB" into something useable when graphing.

The actual logic for parsing is provided by the go-humanize package which is already a dependency of opentelemetry-collector-contrib.

Testing:

  • e2e tests have been added in a similar way to all of the other OTTL functions
  • unit tests have been added for the ParseBytes function in a similar way as the other OTTL functions
  • We are currently using this function in production in conjunction with the syslogreceiver and transformprocessor when processing logs from Heroku.

Documentation:

Added a similar blurb for ParseBytes in pkg/ottl/ottlfuncs/README.md

Copy link

linux-foundation-easycla bot commented Sep 19, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Contributor

github-actions bot commented Oct 8, 2024

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

@github-actions github-actions bot added the Stale label Oct 8, 2024
@TylerHelmuth
Copy link
Member

@jdeff I missed this one in my notifications.

Can you open an issue for us to discuss the problem this PR solves?

@github-actions github-actions bot removed the Stale label Oct 9, 2024
@jdeff
Copy link
Author

jdeff commented Oct 15, 2024

@jdeff I missed this one in my notifications.

Can you open an issue for us to discuss the problem this PR solves?

Created #35804 to discuss.

Copy link
Contributor

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

@github-actions github-actions bot added the Stale label Oct 30, 2024
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Nov 13, 2024
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