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] Add test to validate ‘Untyped’ Metric type #6083

Closed
PaurushGarg opened this issue Nov 1, 2021 · 1 comment
Closed
Labels
ci-cd CI, CD, testing, build issues comp:prometheus Prometheus related issues comp: receiver Receiver

Comments

@PaurushGarg
Copy link
Member

PaurushGarg commented Nov 1, 2021

Is your feature request related to a problem? Please describe.
In order to verify that the Prometheus receiver is functioning as expected for Prometheus to OTLP data transformations, a test is required for validating all Prometheus supported metric types - specifically Gauge, Counter, Summary, Histogram, and Untyped. The current Prometheus receiver test do not check for ‘Untyped’ metric type where the # TYPE is ‘unknown’. A test for 'Untyped' metric type is needed to be added.

Describe the solution you'd like
We propose the following solution:

Add an additional test case which exposes Untyped Prometheus metric type as data-set for the Prometheus receiver to scrape. This data-set should contain an 'Untyped' metric type where the # TYPE is ‘unknown’. This test could be similar to the existing test for other metric types (Gauge, Counter, Histogram, Summary) in metrics_receiver_test.go.

Expected behavior: An Untyped metric should work the same as a Gauge. The only difference is that no type information is implied. The ‘Untyped’ metric should be cast to a GAUGE_DOUBLE type by the Prometheus Receiver. This will ensure the test to pass.

Additional context
Related to open-telemetry/wg-prometheus#57

Related Open Issues:
#4743
#5001
cc: @alolita @Aneurysm9

@PaurushGarg PaurushGarg changed the title Add test for ‘Untyped’ Metric type for the Prometheus Receiver Add test to validate ‘Untyped’ Metric type for the Prometheus Receiver Nov 1, 2021
@alolita alolita added comp:prometheus Prometheus related issues ci-cd CI, CD, testing, build issues comp: receiver Receiver labels Nov 2, 2021
@PaurushGarg
Copy link
Member Author

@alolita please assign this issue to me. I would like to work on this one.

@PaurushGarg PaurushGarg changed the title Add test to validate ‘Untyped’ Metric type for the Prometheus Receiver [Prometheus Receiver] Add test to validate ‘Untyped’ Metric type Nov 22, 2021
povilasv referenced this issue in coralogix/opentelemetry-collector-contrib Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-cd CI, CD, testing, build issues comp:prometheus Prometheus related issues comp: receiver Receiver
Projects
None yet
Development

No branches or pull requests

3 participants