[Prometheus Receiver] Add test to validate ‘Untyped’ Metric type #6083
Labels
ci-cd
CI, CD, testing, build issues
comp:prometheus
Prometheus related issues
comp: receiver
Receiver
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
The text was updated successfully, but these errors were encountered: