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

allow BatchTimeout to be overriden on the libhoney Transmission #509

Merged
merged 2 commits into from
Sep 14, 2022

Conversation

leviwilson
Copy link
Contributor

Which problem is this PR solving?

We have an issue where our ALB traffic has a ~5m latency because of the cadence in which the CloudWatch logs are sent. Because the ALB represents our top-level traces, this means that all web traffic is delayed by that same amount.

Decreasing the TraceTimeout value assists with this by spreading out the traffic, however this makes our rules a moot point as things we are intentionally trying to downsample do not get downsampled.

What we really need is a manner to control how frequently events are sent upstream to Honeycomb so we can control how frequently we send things. https://github.com/honeycombio/libhoney-go/blob/8af08e456cfe1f786247ffdc755855999add2d76/libhoney.go#L136 indicates that SendFrequency can override how often batches are sent.

Short description of the changes

This PR allows for the BatchTimeout to be configured for refinery rather than explicitly using DefaultBatchTimeout. I realize SendFrequency is what was mentioned above, but refinery calls NewClient rather than Init and you can see that all SendFrequency does is drive BatchTimeout on the Transmission anyway.

@leviwilson leviwilson requested review from a team and emilyashley September 9, 2022 20:21
@MikeGoldsmith MikeGoldsmith added type: enhancement New feature or request version: bump minor A PR that adds behavior, but is backwards-compatible. status: oncall Flagged for awareness from Honeycomb Telemetry Oncall labels Sep 12, 2022
Copy link
Contributor

@MikeGoldsmith MikeGoldsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks @leviwilson 🎉

Only thing missing is adding an example to the config_config.toml to show it being overriden.

@MikeGoldsmith MikeGoldsmith added the status: revision needed Waiting for response to changes requested. label Sep 12, 2022
@leviwilson
Copy link
Contributor Author

Looks great, thanks @leviwilson 🎉

Only thing missing is adding an example to the config_config.toml to show it being overriden.

done

@jessitron
Copy link

Thanks @leviwilson !

@MikeGoldsmith fyi someday there's a more interesting problem to solve here, of refinery noticing Honeycomb's rate-limiting errors and adapting.

This change will go a long way toward letting people solve this problem themselves now.

Copy link
Contributor

@MikeGoldsmith MikeGoldsmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @leviwilson 🎉

@kentquirk kentquirk removed the status: revision needed Waiting for response to changes requested. label Sep 14, 2022
@JamieDanielson JamieDanielson merged commit 8142980 into honeycombio:main Sep 14, 2022
ghost pushed a commit to opsramp/tracing-proxy that referenced this pull request Jul 5, 2024
…ycombio#509)

This PR allows for the BatchTimeout to be configured for refinery rather than explicitly using DefaultBatchTimeout from libhoney
* allow BatchTimeout to be overridden on the libhoney Transmission
* add an example of modifying BatchTimeout in config_complete.toml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: oncall Flagged for awareness from Honeycomb Telemetry Oncall type: enhancement New feature or request version: bump minor A PR that adds behavior, but is backwards-compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants