-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Counter type from statsdreceiver being dropped by prometheusexporter #4153
Labels
bug
Something isn't working
Comments
This was referenced Jan 13, 2022
I'm re-opening this since my last fix was off the spec of statsd receiver, re-trying with the hope of fixing this one at the prometheusexporter end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The counting-type metric from StatsD receiver will always be dropped by the prometheusexporter
Steps to reproduce
c
metric:echo "locmai.test:30|c" | nc -w 1 -v -u 0.0.0.0 8127
What did you expect to see?
The locmai_test metric being exported in the Prometheus Exporter http:https://0.0.0.0:9090
What did you see instead?
No metric be exported from the prometheusexporter, check the metrics.json and the metric is exported there.
What version did you use?
Version: v0.29.0
What config did you use?
Config:
Environment
OS: CentOS, Kubernetes, MacOS,
Additional context
This was due to the logic for the statsdreceiver that set SetAggregationTemporality(pdata.AggregationTemporalityDelta)
opentelemetry-collector-contrib/receiver/statsdreceiver/protocol/metric_translator.go
Line 32 in 139e7dc
And the prometheusexporter is dropping any metric without the AggregationTemporalityCumulative
https://github.com/open-telemetry/opentelemetry-collector/blob/cc41009d95166f0c5ab9a9bddbab9ec903ed163d/exporter/prometheusexporter/accumulator.go#L198
It only check for AggregationTemporalityCumulative, not AggregationTemporalityDelta.
So for the proposal solution:
Fix these lines from prometheusexporter to check the other AggregationTemporality types as well before dropping the metric.
The text was updated successfully, but these errors were encountered: