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

Ensure statsd commands are flushed after each run #38

Merged
merged 2 commits into from
Mar 7, 2018

Conversation

theist
Copy link
Contributor

@theist theist commented Feb 9, 2018

This PR updates StatsD client library and flushes statsd commands at the end of Collect call to fix #37 This is something that happened to us while using the statsd backend without the -interval parameter.

I've tested the resulting binary with and without -interval to check that don't change its behaviour.

For fixing the issue I need a library version that supports Flush() and
the vendored one didn't.
Statsd client sometimes don't send its paiload just after the commands
are sent via buffered client, this commit ensures that there's a Flush
because if `buildkite-metrics` is used without interval the automatic
flush of the client (100ms or 100 commands) may not happen.

This commit calls client.Flush() to ensure all the commands created are
sent to the statsd
@lox
Copy link
Contributor

lox commented Mar 7, 2018

👌

@lox lox merged commit 0581a33 into buildkite:master Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Without interval sometimes stats don't reach statsd
2 participants