Skip to content

Commit ba118bc

Browse files
github-actions[bot]christophe-papazianemmettbutlerZStriker19juanjux
authored
chore(asm): rc logs to debug level [backport 1.20] (#7087)
Backport f4a675f from #7064 to 1.20. set remote config logs to debug level to avoid generating too much logs for customers. ## Checklist - [x] Change(s) are motivated and described in the PR description. - [x] Testing strategy is described if automated tests are not included in the PR. - [x] Risk is outlined (performance impact, potential for breakage, maintainability, etc). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] [Library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) are followed. If no release note is required, add label `changelog/no-changelog`. - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [x] Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [x] Title is accurate. - [x] No unnecessary changes are introduced. - [x] Description motivates each change. - [x] Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary. - [x] Testing strategy adequately addresses listed risk(s). - [x] Change is maintainable (easy to change, telemetry, documentation). - [x] Release note makes sense to a user of the library. - [x] Reviewer has explicitly acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment. - [x] Backport labels are set in a manner that is consistent with the [release branch maintenance policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting) - [x] If this PR touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from `@DataDog/security-design-and-guidance`. - [x] This PR doesn't touch any of that. Co-authored-by: Christophe Papazian <[email protected]> Co-authored-by: Emmett Butler <[email protected]> Co-authored-by: Zachary Groves <[email protected]> Co-authored-by: Juanjo Alvarez Martinez <[email protected]>
1 parent aadbe67 commit ba118bc

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

ddtrace/internal/remoteconfig/worker.py

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import logging
21
import os
32

43
from ddtrace.internal import agent
@@ -49,14 +48,7 @@ def _agent_check(self):
4948
):
5049
self._state = self._online
5150
return
52-
53-
if ddconfig._debug_mode or ddconfig._remote_config_enabled:
54-
LOG_LEVEL = logging.WARNING
55-
else:
56-
LOG_LEVEL = logging.DEBUG
57-
58-
log.log(
59-
LOG_LEVEL,
51+
log.debug(
6052
"Agent is down or Remote Config is not enabled in the Agent\n"
6153
"Check your Agent version, you need an Agent running on 7.39.1 version or above.\n"
6254
"Check Your Remote Config environment variables on your Agent:\n"
@@ -73,11 +65,7 @@ def _online(self):
7365
return
7466

7567
elapsed = sw.elapsed()
76-
if elapsed >= self.interval:
77-
log_level = logging.WARNING
78-
else:
79-
log_level = logging.DEBUG
80-
log.log(log_level, "request config in %.5fs to %s", elapsed, self._client.agent_url)
68+
log.debug("request config in %.5fs to %s", elapsed, self._client.agent_url)
8169

8270
def periodic(self):
8371
# type: () -> None
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
other:
3+
- |
4+
remote config: change log levels of messages about agent down or request config to debug level.

0 commit comments

Comments
 (0)