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

[exporter/prometheusremotewrite] feat: build prometheus unit and add to metadata in prometheusremotewr… #38444

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

Conversation

alexylew
Copy link

@alexylew alexylew commented Mar 7, 2025

…ite exporter

Description

This change adds the logic to convert an OTLP metric unit into the corresponding Prometheus metric unit. It will attempt to map UCUM units to Prometheus units where applicable. This change also extends the metadata emitted by the prometheusremotewrite exporter to include the newly calculated unit.

Link to tracking issue

Fixes #29452

Testing

Added unit tests for the new normalize_unit.go file and also extended some existing unit tests to include more unit types.

Documentation

@alexylew alexylew requested review from dashpole and a team as code owners March 7, 2025 00:31
Copy link

linux-foundation-easycla bot commented Mar 7, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@alexylew alexylew changed the title feat: build prometheus unit and add to metadata in prometheusremotewr… [prometheusremotewriteexporter] feat: build prometheus unit and add to metadata in prometheusremotewr… Mar 10, 2025
@crobert-1
Copy link
Member

Hello @alexylew, thanks for your contribution! To be able to move this PR forward, please sign the CLA.

@alexylew
Copy link
Author

yup working on getting the CLA signed, waiting for the CLA manager at my org to approve

@alexylew alexylew changed the title [prometheusremotewriteexporter] feat: build prometheus unit and add to metadata in prometheusremotewr… [exporter][prometheusremotewrite] feat: build prometheus unit and add to metadata in prometheusremotewr… Mar 11, 2025
@alexylew alexylew changed the title [exporter][prometheusremotewrite] feat: build prometheus unit and add to metadata in prometheusremotewr… [exporter/prometheusremotewrite] feat: build prometheus unit and add to metadata in prometheusremotewr… Mar 11, 2025
@alexylew
Copy link
Author

/fix:all

@alexylew
Copy link
Author

@jmichalek132 or @dashpole if you have a chance to take a look at this PR that'd be much appreciated! This is my first contribution to opentelemetry so not super familiar with all the internal structure yet.

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.

prometheusremotewrite export unit as part of metadata
3 participants