Skip to content
This repository has been archived by the owner on Dec 3, 2024. It is now read-only.

Sampling Results Inaccurate #21

Open
noam-ma-ma opened this issue Jan 10, 2022 · 2 comments
Open

Sampling Results Inaccurate #21

noam-ma-ma opened this issue Jan 10, 2022 · 2 comments

Comments

@noam-ma-ma
Copy link

noam-ma-ma commented Jan 10, 2022

This library used to work, but lately it started to produce weird and inaccurate values.
If I run the full example and check in stackdriver UI for foo metric: m.AddSample([]string{"foo"}, 100), the result in stackdriver is 75 for some reason. It happens on every sample in the basic example.

Screen Shot 2022-01-11 at 0 44 08

@ryanrolds
Copy link

I'm seeing something similar. I'm reporting values between 0 and 1 being reported as 10.

@ryanrolds
Copy link

My issue turned out to be the default bucketer, https://github.com/google/go-metrics-stackdriver/blob/main/stackdriver.go#L169-L171. I defined a custom on and that resolved the issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants