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

prometheusremotewrite export unit as part of metadata #29452

Open
jmichalek132 opened this issue Nov 22, 2023 · 10 comments · May be fixed by #38444
Open

prometheusremotewrite export unit as part of metadata #29452

jmichalek132 opened this issue Nov 22, 2023 · 10 comments · May be fixed by #38444
Labels
exporter/prometheusremotewrite never stale Issues marked with this label will be never staled and automatically removed

Comments

@jmichalek132
Copy link
Contributor

Component(s)

exporter/prometheusremotewrite

Describe the issue you're reporting

As discussed here #27565 (comment) the current implementation of metadata in the remote write exporter leaves unit unset, because prometheus expects full words instead of the UCUM abbreviation. To enabling this refactoring of https://github.com/jmichalek132/opentelemetry-collector-contrib/blob/1f646ab1bf7f01e014cadbfff9494e3694cf9c18/pkg/translator/prometheus/normalize_name.go#L119 might be necessary.

I don't think this is critical, especially since as afar as I know there is no way to view the unit in the UI of prometheus or Grafana as of now. So it's mostly relevant for other systems using the prometheus metadata APIs which will return the unit if set.

@jmichalek132 jmichalek132 added the needs triage New item requiring triage label Nov 22, 2023
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@crobert-1
Copy link
Member

crobert-1 commented Nov 22, 2023

Removed the needs triage label due to the discussion from the referenced PR.

Thanks for including the references in your issue description @jmichalek132!

@jmichalek132
Copy link
Contributor Author

Hey, @crobert-1 could we please remove the bug label too? Since this is not really a bug.

@crobert-1 crobert-1 removed the bug Something isn't working label Nov 22, 2023
@jmichalek132
Copy link
Contributor Author

As far as I can tell Grafana currently doesn't show unit even when it's present in metadata, so I will hold off on implementing this until that changes. FIlled an issue on Grafana for this grafana/grafana#80512

Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Mar 15, 2024
@jmichalek132
Copy link
Contributor Author

Not stale I will get to this.

@crobert-1 crobert-1 removed the Stale label Mar 15, 2024
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label May 15, 2024
@crobert-1 crobert-1 added never stale Issues marked with this label will be never staled and automatically removed and removed Stale labels May 15, 2024
@alexylew
Copy link

Hey @jmichalek132 we're running into an issue where we try to use the unit from the prometheus metadata and currently its never set. Can you give an estimate as to when this will get worked on/finished? Alternatively can you give a little more direction on what needs to be refactored to allow the metric name to get included again? Happy to try and contribute as well.

@jmichalek132
Copy link
Contributor Author

Hey @jmichalek132 we're running into an issue where we try to use the unit from the prometheus metadata and currently its never set. Can you give an estimate as to when this will get worked on/finished? Alternatively can you give a little more direction on what needs to be refactored to allow the metric name to get included again? Happy to try and contribute as well.

Sorry for the late reply, I was busy with other things as for me this is a nice to have I am not sure I will get to this any time, but if you are still willing to contribute this that would be great.

To implement this you would need to fill out the unit here https://github.com/jmichalek132/opentelemetry-collector-contrib/blob/main/pkg/translator/prometheusremotewrite/otlp_to_openmetrics_metadata.go#L65.

But as mentioned in the issue you can't just copy over the one from the OTEL you have to translate it to what prometheus expects.
Reference materials for that:

@obs-gh-alexlew
Copy link

@jmichalek132 I can't seem to add reviewers/assignees but if you can take a look and confirm that I'm on the right track then I'll flesh out the existing README with additional descriptions of the unit conversions happening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
exporter/prometheusremotewrite never stale Issues marked with this label will be never staled and automatically removed
Projects
None yet
4 participants