Skip to content

Commit 4c437bd

Browse files
mabdinuravara1986
andauthored
chore(rcm): update warning message (backport #5223 to 1.9) (#5278)
#5223 ## 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/contributing.html#Release-Note-Guidelines) are followed. - [x] Documentation is included (in-code, generated user docs, [public corp docs](https://github.com/DataDog/documentation/)). - [x] Author is aware of the performance implications of this PR as reported in the benchmarks PR comment. ## 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 is aware of, and discussed the performance implications of this PR as reported in the benchmarks PR comment. Co-authored-by: Alberto Vara <[email protected]>
1 parent 627e450 commit 4c437bd

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

ddtrace/internal/remoteconfig/__init__.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import logging
2+
import os
13
from typing import Optional
24

35
from ddtrace.internal import agent
@@ -6,6 +8,7 @@
68
from ddtrace.internal.logger import get_logger
79
from ddtrace.internal.remoteconfig.constants import REMOTE_CONFIG_AGENT_ENDPOINT
810
from ddtrace.internal.remoteconfig.worker import RemoteConfigWorker
11+
from ddtrace.internal.utils.formats import asbool
912

1013

1114
log = get_logger(__name__)
@@ -24,13 +27,19 @@ def _check_remote_config_enable_in_agent(cls):
2427
"/" + REMOTE_CONFIG_AGENT_ENDPOINT
2528
) in data.get("endpoints", []):
2629
return True
27-
log.warning(
30+
31+
if asbool(os.environ.get("DD_TRACE_DEBUG")) or "DD_REMOTE_CONFIGURATION_ENABLED" in os.environ:
32+
LOG_LEVEL = logging.WARNING
33+
else:
34+
LOG_LEVEL = logging.DEBUG
35+
36+
log.log(
37+
LOG_LEVEL,
2838
"Agent is down or Remote Config is not enabled in the Agent\n"
2939
"Check your Agent version, you need an Agent running on 7.39.1 version or above.\n"
3040
"Check Your Remote Config environment variables on your Agent:\n"
3141
"DD_REMOTE_CONFIGURATION_ENABLED=true\n"
32-
"DD_REMOTE_CONFIGURATION_KEY=<YOUR-KEY>\n"
33-
"See: https://app.datadoghq.com/organization-settings/remote-config"
42+
"See: https://docs.datadoghq.com/agent/guide/how_remote_config_works/",
3443
)
3544
return False
3645

0 commit comments

Comments
 (0)