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

Add Prometheus Receiver test for running Open Metrics test cases #6106

Closed
mustafain117 opened this issue Nov 2, 2021 · 1 comment · Fixed by #6409
Closed

Add Prometheus Receiver test for running Open Metrics test cases #6106

mustafain117 opened this issue Nov 2, 2021 · 1 comment · Fixed by #6409
Labels
comp:prometheus Prometheus related issues comp: receiver Receiver

Comments

@mustafain117
Copy link
Contributor

mustafain117 commented Nov 2, 2021

Is your feature request related to a problem? Please describe.
Problem Statement:
In order to verify that the Prometheus receiver is functioning as expected for transforming Prometheus to OTLP format, a test needs to be added for negative test cases from the OpenMetrics project to validate all Prometheus supported metric types being ingested by the receiver.
The OpenMetrics repository provides extensive Prometheus metrics test data here: https://github.com/OpenObservability/OpenMetrics/tree/main/tests/testdata/parsers

Current Behavior:
Currently, the Prometheus receiver is tested with positive cases for Gauge, Counter, Histogram and Summary Metric types (TestEndToEnd).
In addition to the positive tests, we’d like to use test data from OpenMetrics tests to cover negative test cases for each Prometheus metric type.

Describe the solution you'd like

We propose the following solution:

Add an additional test that creates targets with metrics data pulled from the OpenMetrics repository. The Prometheus receiver will scrape these targets and the test will validate the output from the receiver for each test case.
This text file provides a list of urls for the test data: https://github.com/OpenObservability/OpenMetrics/blob/main/tests/urls.txt
The negative test cases are represented with a suffix of “bad_” in the test name.
For e.g. bad_histograms_0:

# TYPE a histogram
a_sum 1
# EOF

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

@alolita alolita added comp:prometheus Prometheus related issues comp: receiver Receiver labels Nov 10, 2021
@mustafain117
Copy link
Contributor Author

@alolita please assign this issue to me.

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