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

Statsd receiver incorrect handling of histogram/timer sample rate #5252

Closed
jmacd opened this issue Sep 16, 2021 · 0 comments · Fixed by #6155
Closed

Statsd receiver incorrect handling of histogram/timer sample rate #5252

jmacd opened this issue Sep 16, 2021 · 0 comments · Fixed by #6155
Labels
bug Something isn't working

Comments

@jmacd
Copy link
Contributor

jmacd commented Sep 16, 2021

Describe the bug

The statsdreceiver has a syntax for sampled histogram and timer events. The line has metric type "h" or "ms" and an "@Rate" member to indicate sampling. When this occurs, the consumer is meant to observe 1/rate (i.e., the adjusted count) number of identical events with a certain value.

Today's code is treating the histogram/timer value like a counter, i.e., scaling the value by the adjusted count.

Steps to reproduce

Happens here:

What did you expect to see?
The code needs a bit of restructuring before this can be easily fixed. The montanaflynn/stats package does not have the method we would need to easily implement this.

What did you see instead?

Instead of montanaflynn/stats, I think we should use the Prometheus golang client's summary data structure directly.

Additional context
The term "adjusted count" is defined in OTEP 170 as the inverse of sampling probability

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant