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

Drain collector buffer on Close #36

Merged

Conversation

richardmarshall
Copy link
Contributor

Update the Close() logic of the HTTP and Scribe Collectors to drain any
pending spans before returning. This provides a mechanism to prevent
loss of buffered trace data when shutting down.

This is of particular use for short lived processes such as cli clients.

@basvanbeek
Copy link
Member

basvanbeek commented Dec 14, 2016

Thanks for the contribution Richard. I will check the code on Friday when done with meetings and traveling. I quickly glanced at it and it looks good but want to give it a tiny bit more attention.

If it works properly I will also update the CLI examples as they currently use a wait for the buffer to be flushed.

Update the Close() logic of the HTTP and Scribe Collectors to drain any
pending spans before returning. This provides a mechanism to prevent
loss of buffered trace data when shutting down.
@richardmarshall
Copy link
Contributor Author

Thanks for the update. I can quickly add the CLI example change to this PR. Didn't notice it when I was updating the tests to make use of the new Close logic.

@basvanbeek basvanbeek merged commit 9e01852 into openzipkin-contrib:master Dec 19, 2016
@basvanbeek
Copy link
Member

Thanks for the contribution Richard

@richardmarshall richardmarshall deleted the drain_collector_on_close branch December 19, 2016 21:42
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.

2 participants