Allow suppresing error logs for Core::Remote::Negotiation #3495
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds
suppress_logging
keyword argument that makes it possible to skip logging error messages for selected error cases.Usage:
Motivation:
datadog-ci
gem usesDatadog::Core::Remote::Negotiation
to check if agent has certain endpoints available(/evp_proxy/v4
and/evp_proxy/v2/
) to configure the correct transport for citestcycle events. We do not treat the absence of any of these endpoints as error, just an information for us to choose the correct way to send events.Currently, this class treats this situation as an error and logs error message thus creating unnecessary noise for the user. This PR aims to fix it by allowing us to skip certain logs.
How to test the change?
Covered by unit tests; default behaviour didn't change.
For Datadog employees:
credentials of any kind, I've requested a review from
@DataDog/security-design-and-guidance
.