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

[processor/transform] Add functions for conversion of scalar metric types #10255

Merged
merged 13 commits into from
Jun 1, 2022

Conversation

BinaryFissionGames
Copy link
Contributor

Description:

  • Add convert_gauge_to_sum and convert_sum_to_gauge functions
    • I added in resolution of bool parameters to support the is_monotonic parameter, as well.

Link to tracking Issue: #10130

Testing:
Added some unit tests. Manually tested converting metrics with the processor.

Documentation:
Added new functions to docs under a "metrics only" section of the config.

@TylerHelmuth
Copy link
Member

I'll do a proper review of this tomorrow, but after a quick overview on my phone it looks promising!

@BinaryFissionGames BinaryFissionGames marked this pull request as ready for review May 23, 2022 22:21
@BinaryFissionGames BinaryFissionGames requested a review from a team May 23, 2022 22:21
@TylerHelmuth
Copy link
Member

A fix I made for aggregation_temporality and is_monotonic that changed how they are accessed to make them usable in conditions was merged in preparation for 0.52.0. It might affect your new functions.

@BinaryFissionGames BinaryFissionGames force-pushed the transform-convert-scalars branch from 8f3b5be to 2e263a3 Compare May 24, 2022 15:16
Copy link
Member

@TylerHelmuth TylerHelmuth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding these functions!

@TylerHelmuth
Copy link
Member

/cc @anuraaga

@BinaryFissionGames BinaryFissionGames force-pushed the transform-convert-scalars branch 2 times, most recently from 147a85c to bcbf8ac Compare May 31, 2022 17:15
@BinaryFissionGames BinaryFissionGames force-pushed the transform-convert-scalars branch from bcbf8ac to 87e7f56 Compare June 1, 2022 13:54
@BinaryFissionGames
Copy link
Contributor Author

Rebased again;

@TylerHelmuth is this waiting on something before being merged, or do you think it's OK to merge at this point?

@TylerHelmuth
Copy link
Member

Rebased again;

@TylerHelmuth is this waiting on something before being merged, or do you think it's OK to merge at this point?

Would be good to get 1 more approval I think before read-to-merge. @anuraaga @bogdandrutu do you want to take a look?

@TylerHelmuth TylerHelmuth added the ready to merge Code review completed; ready to merge by maintainers label Jun 1, 2022
@BinaryFissionGames
Copy link
Contributor Author

Thanks @anuraaga and @TylerHelmuth!

@djaglowski could you merge this when you get the chance?

@djaglowski djaglowski merged commit bb685fa into open-telemetry:main Jun 1, 2022
kentquirk pushed a commit to McSick/opentelemetry-collector-contrib that referenced this pull request Jun 14, 2022
…ypes (open-telemetry#10255)

* add conversion functions for scalar metrics

* fix failing factory test

* lint

* revert EqualsValue

* update registry comment

* changelog

* move Bool rule down under string

* Rename metric only functions header

Co-authored-by: Tyler Helmuth <[email protected]>

* add example in readme

* capitialize Sum

* Add disclaimer to README that functions may break semantics

* use new testhelper package for test pointers from literals

* move changelog entry to unreleased

Co-authored-by: Tyler Helmuth <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants