-
Notifications
You must be signed in to change notification settings - Fork 92
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
feat: Update Honeycomb logger to use EMAThroughput sampler #1328
Conversation
Will this also aid #1222? |
Yes, it probably 👍🏻 |
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.
Sounds good, but given what we've been learning about EMA, we should extend the interval.
logger/honeycomb.go
Outdated
PerKeyThroughputPerSec: loggerConfig.SamplerThroughput, | ||
MaxKeys: 1000, | ||
h.sampler = &dynsampler.EMAThroughput{ | ||
AdjustmentInterval: 10 * time.Second, |
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.
Let's lengthen this interval -- maybe to 30s, please?
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.
Given all the quirks that we recently discovered in EMA samplers, I'm worried that it's going to be harder to reason why a log line doesn't get sampled
We already sample refinery log messages; this change is just give burst protection when a sudden increase increase happens. The throughput samplers ensure any unique log message is sent at least once per window. |
## Which problem is this PR solving? Updates the Honeycomb logger to use the [EMAThroughput](https://github.com/honeycombio/dynsampler-go/blob/main/emathroughput.go#L77) sampler. This sampler has built-in support for burst protection that the [PerKeyThroughput](https://github.com/honeycombio/dynsampler-go/blob/main/perkeythroughput.go#L17) sampler does not. Burst protection would be useful when a cluster node does down unexpectedly because the other nodes in the cluster will fail to make peer requests until it is removed from the cluster. This can result in a very high number of "failed to send" log messages in a very small window, faster than what the PerKeyThroughput sampler can adjust the sample rate which results in all log messages being sent. The burst protection from the EMAThroughput sampler would help here as it will schedule an update to sample rates if a high number of events are received very quickly, allowing it to react quicker. This is a like for like replacement, and such I haven't added any additional configuration options the new sampler supports. We can add more later if desired. ## Short description of the changes - Replace the Honeycomb logger sampler with the EMAThroughput sampler.
Which problem is this PR solving?
Updates the Honeycomb logger to use the EMAThroughput sampler. This sampler has built-in support for burst protection that the PerKeyThroughput sampler does not.
Burst protection would be useful when a cluster node does down unexpectedly because the other nodes in the cluster will fail to make peer requests until it is removed from the cluster. This can result in a very high number of "failed to send" log messages in a very small window, faster than what the PerKeyThroughput sampler can adjust the sample rate which results in all log messages being sent. The burst protection from the EMAThroughput sampler would help here as it will schedule an update to sample rates if a high number of events are received very quickly, allowing it to react quicker.
This is a like for like replacement, and such I haven't added any additional configuration options the new sampler supports. We can add more later if desired.
Short description of the changes