-
Notifications
You must be signed in to change notification settings - Fork 18
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 a reservoir for timers #171
base: master
Are you sure you want to change the base?
Conversation
98706b1
to
72bc838
Compare
stats_test.go
Outdated
counter = sink.record | ||
if !strings.Contains(counter, expected) { | ||
t.Error("wanted counter value of test.___f=i:1|c, got", counter) | ||
expected = "test.__host=i:1|c" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this test change is out of scope of this work but it was previously volatile with the order of reserved_tag vs test.__host not being deterministic
re-design with the notion of sample rate appended to the metric
improve naming
@@ -6,6 +6,7 @@ type Sink interface { | |||
FlushCounter(name string, value uint64) | |||
FlushGauge(name string, value uint64) | |||
FlushTimer(name string, value float64) | |||
FlushAggregatedTimer(name string, value, sampleRate float64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because of this we'll need a new major release.
The library usage should be backwards compatible, and additionally there is a feature flag to control the new behaviour, however if anything is implementing this interface it'll break.
Add a configurable reservoir implementation for timers. This should allow controlled stat load specifically for timers.