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

Prometheus receiver doesn't support untyped metrics #4743

Closed
gracewehner opened this issue Aug 17, 2021 · 6 comments
Closed

Prometheus receiver doesn't support untyped metrics #4743

gracewehner opened this issue Aug 17, 2021 · 6 comments
Labels
comp:prometheus Prometheus related issues Stale

Comments

@gracewehner
Copy link
Contributor

Describe the bug
Prometheus receiver does not convert metrics without the TYPE hint to OTLP correctly and treats them as invalid, whereas Prometheus will treat these metrics as a gauge.

Steps to reproduce
Scrape an endpoint that has metrics without the # TYPE <metric name> <metric type> hint.

What did you expect to see?
Prometheus receiver matching Prometheus functionality and treating the metric as a gauge type.

@gracewehner gracewehner changed the title Prometheus receiver doesn Prometheus receiver doesn't support untyped metrics Aug 17, 2021
@dashpole
Copy link
Contributor

+1
I believe I encountered this as well when playing around with the bitnami spark helm chart as well.

I got a metric like metrics_master_aliveWorkers_Number{type="gauges"} 2 without a preceding type comment (and they put the type in a label?).

@bogdandrutu bogdandrutu transferred this issue from open-telemetry/opentelemetry-collector Aug 20, 2021
@alolita alolita added the comp:prometheus Prometheus related issues label Sep 2, 2021
@dashpole
Copy link
Contributor

This was discussed at the prometheus WG today in the context of additional compliance tests. One of the planned tests would check that MetricTypeUnknown metrics, including both ones you describe in the description, and metrics that are renamed (which is also currently a problem), are correctly propagated to prometheus remote_write endpoints from a prometheus receiver.

Correct me if i'm wrong, but I believe #4865 would change unknown typed metrics to gauges, and wouldn't pass such a test if we added it.

OpenCensus did support a MetricDescriptor_UNSPECIFIED type, which would allow this information to be propagated. pdata has a MetricDataTypeNone, but i'm not sure if that is the correct data type to use here.

cc @alolita @Aneurysm9

@dashpole
Copy link
Contributor

@Aneurysm9
Copy link
Member

I don't think MetricDataTypeNone will work, it's just the zero value for that type. There's no way to add or retrieve data with that type.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2022

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.

@github-actions github-actions bot added the Stale label Nov 4, 2022
@Aneurysm9
Copy link
Member

I believe this issue is no longer applicable. #6708 added tests that ensure we're handling untyped metrics as gauges. Please re-open if further issues are discovered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:prometheus Prometheus related issues Stale
Projects
None yet
Development

No branches or pull requests

4 participants