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 translates metrics to OTLP metrics with non-cumulative temporality #1541

Closed
huyan0 opened this issue Aug 12, 2020 · 4 comments
Labels
bug Something isn't working help wanted Good issue for contributors to OpenTelemetry Service to pick up

Comments

@huyan0
Copy link
Member

huyan0 commented Aug 12, 2020

I am doing an end-to-end test for the Prometheus remote write exporter in PR #1525, and I am using the Prometheus receiver to get input metrics.

In the process, I discovered counter, histogram, and summary Prometheus metric scraped by the Prometheus receiver are not exportable by the remote write exporter, but gauge metrics are exported. This is because the remote write exporter drops non-cumulative monotonic int64, monotonic double, histogram, and summary, but doesn’t check the temporality on int64/double OTLP metrics.

The Prometheus receiver seems to translate counter, histogram, and summary metrics into OTLP metrics with non-cumulative temporality. Is this the expected behavior or should the Prometheus receiver/translation gets modified?

If this is the expected behavior, what’s an alternate receiver to use to ensure cumulative metrics of different types will not be dropped by the exporter?

cc @huyan0 @alolita @jmacd @bogdandrutu

@huyan0 huyan0 added the bug Something isn't working label Aug 12, 2020
@huyan0 huyan0 changed the title Prometheus Receiver translates metric values to OTLP metrics with non-cumulative temporality Prometheus Receiver translates metrics to OTLP metrics with non-cumulative temporality Aug 12, 2020
@huyan0
Copy link
Member Author

huyan0 commented Aug 13, 2020

I replaced Prometheus receiver with a OTLP receiver; the metrics remained cumulative and was exported successfully.

@tigrannajaryan tigrannajaryan added this to the GA 1.0 milestone Aug 19, 2020
@djjayeeta
Copy link

I have the same issue but I am using prometheus receiver with file exporter, I only see gauge metrics. My metrics are exposed in prometheus format, so I am left with the choice of using prometheus receiver.
Is this an expected behavior?
Which exporters works with histogram metrics + prometheus receiver?

@huyan0
Copy link
Member Author

huyan0 commented Aug 27, 2020

An update on this issue. This is the log I am getting from the Prometheus remote write exporter:

2020/08/27 16:44:34 invliad type and temp
2020/08/27 16:44:34 name:"demo_my_counter_metric" description:"The description of my_counter_metric" type:MONOTONIC_DOUBLE 
2020/08/27 16:44:34 temporality:  INVALID_TEMPORALITY

This shows the OC to OT translation is setting the temporality to INVALID_TEMPORALITY(not setting it at all perhaps?); this makes the metrics not pass the check of the Prometheus remote write exporter.

@tigrannajaryan tigrannajaryan added the help wanted Good issue for contributors to OpenTelemetry Service to pick up label Sep 2, 2020
@huyan0
Copy link
Member Author

huyan0 commented Sep 3, 2020

With OTLP v0.5 temporality translation is added. The Prometheus receiver works with the remote write exporter

@huyan0 huyan0 closed this as completed Sep 3, 2020
MovieStoreGuy pushed a commit to atlassian-forks/opentelemetry-collector that referenced this issue Nov 11, 2021
* Rename otel/label -> otel/attr

Leave the imported name alone, to avoid a large diff and conflicts

* Better import comment

* Update CHANGELOG.md

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

* otel/attr -> otel/attribute

* Missed the changelog entry

* Get rid of import renaming

* Merge remaining conflicts

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
Co-authored-by: Anthony Mirabella <a9@aneurysm9.com>
hughesjj pushed a commit to hughesjj/opentelemetry-collector that referenced this issue Apr 27, 2023
* initial version of the pulsar exporter (metrics). Tests yet to be added. (open-telemetry#1541)

authored-by: Shiva Param <sparam@paypal.com>
authored-by: Narasimha Rao <narasirao@paypal.com>
authored-by: narasimharaojm <madhunarasimharao@gmail.com>

* pulsarexporter: fix lint, remove failing tests (open-telemetry#1682)

This is an experimental component added by PayPal. Unit tests to be added later.
Troels51 pushed a commit to Troels51/opentelemetry-collector that referenced this issue Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Good issue for contributors to OpenTelemetry Service to pick up
Projects
None yet
Development

No branches or pull requests

3 participants