Repository navigation
Conversation
…-aware Guards comparing against GetLogLevel, which only reports the default level, stop working with per-package rules; replace them with ShouldLog checks: - seclog's IsTracing/IsDebugging now report whether trace/debug is enabled instead of requiring an exact level match, so IsDebugging is true at trace level as well; the mount point resolver gate collapses to IsDebugging alone. - the SNMP session attaches its gosnmp logger when trace logging is enabled. The trace-agent remote config handler keeps and compares the full log level spec (via GetLogLevelSpec) instead of only the default level, so an override is actually removed when the remote config stops sending it, and the /config/set request URL-escapes the value. On the receiving side, the endpoint no longer lowercases the value before validation: import paths are case-sensitive, so a per-package spec would be rewritten into one that never matches.
Contributor
Contributor
Files inventory check summaryFile checks results against ancestor 29b66769: Results for datadog-agent_7.86.0~devel.git.315.20cb9c8.pipeline.143696952-1_amd64.deb:No change detected Results for datadog-iot-agent_7.86.0~devel.git.315.20cb9c8.pipeline.143696952-1_amd64.deb:No change detected |
Contributor
Static quality checks✅ Please find below the results from static quality gates Successful checksInfo
3 successful checks with minimal change (< 2 KiB)
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
Remove various uses of
log.GetLogLevel, in favor ofShouldLogorGetLogLevelSpecdepending on how the level was used.Motivation
GetLogLevel()only reports the default level, so with #57848 anything built on it ignores per-package rules.Describe how you validated your changes
New tests for the
/config/setendpoint (values stored as given, including an uppercase import path), the remote config spec flow (escaping, override removal) and the seclog level checks;dda inv teston all touched packages and the linter pass.