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

Reduce remote configuration error logging #3011

Merged
merged 4 commits into from
Jul 28, 2023
Merged

Reduce remote configuration error logging #3011

merged 4 commits into from
Jul 28, 2023

Conversation

lloeki
Copy link
Contributor

@lloeki lloeki commented Jul 28, 2023

What does this PR do?

Reduce remote configuration error logging by:

  • limiting to one error message per occurence of negotiation failure + type of failure
  • moving transport level error reporting to debug level
  • bubbling internal transport error responses to the level above so that they trigger the error path, with transport level information reporting via error logging

Motivation

When remote configuration counters an error state related to transport (typically agent unreachability or misconfiguration) it continuously retries, which results in a constant stream of errors.

Additional Notes

How to test the change?

  • start an app
  • start and stop the agent at various times

@lloeki lloeki requested a review from a team July 28, 2023 19:12
@github-actions github-actions bot added the core Involves Datadog core libraries label Jul 28, 2023
@TonyCTHsu TonyCTHsu added this to the 1.13.0 milestone Jul 28, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #3011 (88ce4d1) into master (7f1049c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #3011   +/-   ##
=======================================
  Coverage   98.08%   98.09%           
=======================================
  Files        1317     1317           
  Lines       74314    74363   +49     
  Branches     3397     3402    +5     
=======================================
+ Hits        72893    72944   +51     
+ Misses       1421     1419    -2     
Files Changed Coverage Δ
lib/datadog/core/remote/client.rb 91.07% <100.00%> (+1.16%) ⬆️
lib/datadog/core/remote/component.rb 95.65% <100.00%> (+1.53%) ⬆️
lib/datadog/core/remote/negotiation.rb 100.00% <100.00%> (ø)
lib/datadog/core/transport/http/client.rb 100.00% <100.00%> (ø)
spec/datadog/core/remote/client_spec.rb 100.00% <100.00%> (ø)
spec/datadog/core/remote/component_spec.rb 100.00% <100.00%> (ø)
spec/datadog/core/remote/negotiation_spec.rb 100.00% <100.00%> (ø)
spec/datadog/core/transport/http_spec.rb 98.97% <100.00%> (+0.05%) ⬆️

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@marcotc marcotc merged commit eed3de7 into master Jul 28, 2023
203 checks passed
@marcotc marcotc deleted the reduce-rc-logging branch July 28, 2023 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants