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

Increase agent communication timeouts and add more logging #1590

Merged
merged 2 commits into from
Jun 15, 2020

Conversation

bantonsson
Copy link
Contributor

This PR has two parts:

  1. It increase the timeouts for communicating to the agent from 1 second to 10 seconds, since the communication happens on a separate thread and won't block application. It also tries to connect to the agent as soon as the writer is started, again on the separate thread, to get the http client creation out of the way of normal sending.
  2. It makes logging the results of agent communication more uniform, adds more information, and also logs the first success after a failure on info level. The first success after failure logging is subject to the same quiet period as failure logging.

Have tested and verified logging locally, since I can't figure out how to test that in unit tests in a nice way.

The timeout configuration option should be added to the docs. Where is that done?

@bantonsson bantonsson requested a review from a team as a code owner June 15, 2020 14:08
@bantonsson bantonsson self-assigned this Jun 15, 2020
@bantonsson bantonsson force-pushed the ban/better-reporting-logs branch 2 times, most recently from ee74e78 to 353eba9 Compare June 15, 2020 15:01
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.

None yet

3 participants