Skip to content

Commit 8423d8f

Browse files
authored
chore(lib): reduce noise in debug logs (#13488)
Removes useless and noisy debug logs. Make existing start up logs more informative. ### Before ``` Reading stable configuration from files: local: "/opt/datadog-agent/etc/application_monitoring.yaml" fleet: "/opt/datadog-agent/etc/stable/application_monitoring.yaml" Called library_config_common_component: source: LocalStableConfig configurator: Configurator { debug_logs: true } process args: "/Users/munirabdinur/.pyenv/versions/3.12.7/bin/python" "-c" "import ddtrace.auto; import time; time.sleep(60)" process language: "python" No selector matched for source LocalStableConfig Called library_config_common_component: source: FleetStableConfig configurator: Configurator { debug_logs: true } process args: "/Users/munirabdinur/.pyenv/versions/3.12.7/bin/python" "-c" "import ddtrace.auto; import time; time.sleep(60)" process language: "python" No selector matched for source FleetStableConfig debug mode has been enabled for the ddtrace logger Configuration endpoint not set. Skipping fetching configuration. Calling 1 registered hooks on import of module 'ddtrace.vendor.dogstatsd.base' initialized processor <ddtrace._trace.processor.TopLevelSpanProcessor object at 0x10355fa70> initialized trace processor <ddtrace._trace.processor.TraceSamplingProcessor object at 0x10514e720> initialized DatadogSampler(agent_rates={}, limiter=RateLimiter(rate_limit=100, tokens=100, last_update_ns=299731046765375, effective_rate=1.0), rules=[]), rate_limit_always_on=False initialized trace processor <ddtrace._trace.processor.TraceTagsProcessor object at 0x1032f6150> Statsd buffering is disabled Statsd periodic buffer flush is disabled initialized processor SpanAggregator(True, 300, <ddtrace._trace.processor.TraceSamplingProcessor object at 0x10514e720>,<ddtrace._trace.processor.TraceTagsProcessor object at 0x1032f6150>,[<ddtrace.internal.peer_service.processor.PeerServiceProcessor object at 0x105203a40>, <ddtrace.internal.schema.processor.BaseServiceProcessor object at 0x104bc7440>], AgentWriter(status=<ServiceStatus.STOPPED: 'stopped'>, intake_url='http://localhost:8126', dogstatsd=<ddtrace.vendor.dogstatsd.base.DogStatsd object at 0x103f1ecc0>)) git tags from env: git tags: crashtracking enabled via environment variable additional sitecustomize not found RemoteConfigWorker created with polling interval 5 [18720][P: 61575] Register ASM Remote Config Callback [PID 18720] Subscriber ASM initialized creating new intake connection to http://localhost:8126 with timeout 2 Sending request: PUT v0.5/traces {'Datadog-Meta-Lang': 'python', 'Datadog-Meta-Lang-Version': '3.12.7', 'Datadog-Meta-Lang-Interpreter': 'CPython', 'Datadog-Meta-Tracer-Version': '3.8.0.dev61+gb32b6a4e76', 'Datadog-Client-Computed-Top-Level': 'yes', 'Content-Type': 'application/msgpack', 'X-Datadog-Trace-Count': '1'} Got response: 200 OK sent 16B in 0.00624s to http://localhost:8126/v0.5/traces - DATADOG TRACER CONFIGURATION - {'date': '2025-05-22T14:08:08.328017', 'os_name': 'Darwin', 'os_version': '24.4.0', 'is_64_bit': True, 'architecture': '64bit', 'vm': 'CPython', 'version': '3.8.0.dev61+gb32b6a4e76', 'lang': 'python', 'lang_version': '3.12.7', 'pip_version': '25.0', 'in_virtual_env': False, 'agent_url': 'http://localhost:8126', 'agent_error': None, 'statsd_url': 'udp://localhost:8125', 'env': '', 'is_global_tracer': True, 'enabled_env_setting': None, 'tracer_enabled': True, 'sampler_type': 'DatadogSampler', 'priority_sampler_type': 'N/A', 'sampler_rules': [], 'service': 'moontest', 'debug': True, 'enabled_cli': False, 'analytics_enabled': False, 'log_injection_enabled': False, 'health_metrics_enabled': False, 'runtime_metrics_enabled': False, 'dd_version': '', 'global_tags': '', 'tracer_tags': '', 'integrations': {'aioredis': 'N/A', 'aiomysql': 'N/A', 'aredis': 'N/A', 'asyncio': 'N/A', 'avro': 'N/A', 'boto': 'N/A', 'botocore': 'N/A', 'bottle': 'N/A', 'cassandra': 'N/A', 'celery': 'N/A', 'consul': 'N/A', 'ddtrace_api': 'N/A', 'django': 'N/A', 'dramatiq': 'N/A', 'elasticsearch': 'N/A', 'algoliasearch': 'N/A', 'futures': 'N/A', 'freezegun': 'N/A', 'google_generativeai': 'N/A', 'gevent': 'N/A', 'graphql': 'N/A', 'grpc': 'N/A', 'httpx': 'N/A', 'kafka': 'N/A', 'langgraph': 'N/A', 'litellm': 'N/A', 'mongoengine': 'N/A', 'mysql': 'N/A', 'mysqldb': 'N/A', 'pymysql': 'N/A', 'mariadb': 'N/A', 'psycopg': 'N/A', 'pylibmc': 'N/A', 'pymemcache': 'N/A', 'pymongo': 'N/A', 'redis': 'N/A', 'rediscluster': 'N/A', 'requests': 'N/A', 'rq': 'N/A', 'sanic': 'N/A', 'snowflake': 'N/A', 'sqlalchemy': 'N/A', 'sqlite3': 'N/A', 'aiohttp': 'N/A', 'aiohttp_jinja2': 'N/A', 'aiopg': 'N/A', 'aiobotocore': 'N/A', 'httplib': 'N/A', 'urllib3': 'N/A', 'vertexai': 'N/A', 'vertica': 'N/A', 'molten': 'N/A', 'jinja2': 'N/A', 'mako': 'N/A', 'flask': 'N/A', 'kombu': 'N/A', 'starlette': 'N/A', 'falcon': 'N/A', 'pyramid': 'N/A', 'logbook': 'N/A', 'logging': 'N/A', 'loguru': 'N/A', 'structlog': 'N/A', 'pynamodb': 'N/A', 'pyodbc': 'N/A', 'fastapi': 'N/A', 'dogpile_cache': 'N/A', 'yaaredis': 'N/A', 'asyncpg': 'N/A', 'aws_lambda': 'N/A', 'azure_functions': 'N/A', 'tornado': 'N/A', 'openai': 'N/A', 'langchain': 'N/A', 'anthropic': 'N/A', 'crewai': 'N/A', 'subprocess': 'N/A', 'unittest': 'N/A', 'coverage': 'N/A', 'selenium': 'N/A', 'valkey': 'N/A', 'openai_agents': 'N/A', 'protobuf': {'enabled': False, 'instrumented': False, 'module_available': True, 'module_version': '6.30.2', 'module_imported': False, 'config': None}}, 'partial_flush_enabled': True, 'partial_flush_min_spans': 300, 'asm_enabled': False, 'iast_enabled': False, 'waf_timeout': 5.0, 'remote_config_enabled': True} [PID 18720 | PPID 61575] Subscriber ASM is getting data [PID 18720 | PPID 61575] Subscriber ASM got data [PID 18720 | PPID 61575] Subscriber ASM is getting data [PID 18720 | PPID 61575] Subscriber ASM got data [PID 18720 | PPID 61575] Subscriber ASM is getting data [PID 18720 | PPID 61575] Subscriber ASM got data [18720][P: 61575] Requesting RC data from products: {'ASM_FEATURES': <ddtrace.appsec._remoteconfiguration.AppSecRC object at 0x10338e150>} [PID 18720 | PPID 61575] Subscriber ASM is getting data [PID 18720 | PPID 61575] Subscriber ASM got data [PID 18720 | PPID 61575] Subscriber ASM is getting data [PID 18720 | PPID 61575] Subscriber ASM got data [PID 18720 | PPID 61575] Subscriber ASM is getting data [PID 18720 | PPID 61575] Subscriber ASM got data [PID 18720 | PPID 61575] Subscriber ASM is getting data [PID 18720 | PPID 61575] Subscriber ASM got data [18720][P: 61575] Requesting RC data from products: {'ASM_FEATURES': <ddtrace.appsec._remoteconfiguration.AppSecRC object at 0x10338e150>} [PID 18720 | PPID 61575] Subscriber ASM is getting data [PID 18720 | PPID 61575] Subscriber ASM got data [PID 18720 | PPID 61575] Subscriber ASM is getting data [PID 18720 | PPID 61575] Subscriber ASM got data [PID 18720 | PPID 61575] Subscriber ASM is getting data [PID 18720 | PPID 61575] Subscriber ASM got data Waiting 5 seconds for tracer to finish. Hit ctrl-c to quit. [PID 18720 | PPID 61575] Subscriber ASM is getting data [PID 18720 | PPID 61575] Subscriber ASM got data [18720][P: 61575] Requesting RC data from products: {'ASM_FEATURES': <ddtrace.appsec._remoteconfiguration.AppSecRC object at 0x10338e150>} Instrumentation Telemetry sent 1315 in 0.49350s to https://all-http-intake.logs.datad0g.com/api/v2/apmtelemetry. response: 202 Instrumentation Telemetry sent 690 in 0.42241s to https://all-http-intake.logs.datad0g.com/api/v2/apmtelemetry. response: 202 Instrumentation Telemetry sent 998 in 0.35086s to https://all-http-intake.logs.datad0g.com/api/v2/apmtelemetry. response: 202 Instrumentation Telemetry sent 692 in 0.37146s to https://all-http-intake.logs.datad0g.com/api/v2/apmtelemetry. response: 202 Instrumentation Telemetry sent 11219 in 0.50757s to https://all-http-intake.logs.datad0g.com/api/v2/apmtelemetry. response: 202 Instrumentation Telemetry sent 886 in 0.41524s to https://all-http-intake.logs.datad0g.com/api/v2/apmtelemetry. response: 202 Instrumentation Telemetry sent 692 in 0.40883s to https://all-http-intake.logs.datad0g.com/api/v2/apmtelemetry. response: 202 ``` ### After ``` Reading stable configuration from files: local: "/opt/datadog-agent/etc/application_monitoring.yaml" fleet: "/opt/datadog-agent/etc/stable/application_monitoring.yaml" Called library_config_common_component: source: LocalStableConfig configurator: Configurator { debug_logs: true } process args: "/Users/munirabdinur/.pyenv/versions/3.12.7/bin/python" "-c" "import ddtrace.auto; import time; time.sleep(60)" process language: "python" No selector matched for source LocalStableConfig Called library_config_common_component: source: FleetStableConfig configurator: Configurator { debug_logs: true } process args: "/Users/munirabdinur/.pyenv/versions/3.12.7/bin/python" "-c" "import ddtrace.auto; import time; time.sleep(60)" process language: "python" No selector matched for source FleetStableConfig Calling 1 registered hooks on import of module 'ddtrace.vendor.dogstatsd.base' initialized DatadogSampler(agent_rates={}, limiter=RateLimiter(rate_limit=100, tokens=100, last_update_ns=299674427175500, effective_rate=1.0), rules=[]), rate_limit_always_on=False Statsd buffering is disabled Statsd periodic buffer flush is disabled additional sitecustomize not found RemoteConfigWorker created with polling interval 5 [14456][P: 61575] Register ASM Remote Config Callback [PID 14456] Subscriber ASM initialized creating new intake connection to http://localhost:8126 with timeout 2 Sending request: PUT v0.5/traces {'Datadog-Meta-Lang': 'python', 'Datadog-Meta-Lang-Version': '3.12.7', 'Datadog-Meta-Lang-Interpreter': 'CPython', 'Datadog-Meta-Tracer-Version': '3.8.0.dev61+gb32b6a4e76', 'Datadog-Client-Computed-Top-Level': 'yes', 'Content-Type': 'application/msgpack', 'X-Datadog-Trace-Count': '1'} Got response: 200 OK sent 16B in 0.00665s to http://localhost:8126/v0.5/traces - DATADOG TRACER CONFIGURATION - {'date': '2025-05-22T14:07:11.695157', 'os_name': 'Darwin', 'os_version': '24.4.0', 'is_64_bit': True, 'architecture': '64bit', 'vm': 'CPython', 'version': '3.8.0.dev61+gb32b6a4e76', 'lang': 'python', 'lang_version': '3.12.7', 'pip_version': '25.0', 'in_virtual_env': False, 'agent_url': 'http://localhost:8126', 'agent_error': None, 'statsd_url': 'udp://localhost:8125', 'env': '', 'is_global_tracer': True, 'enabled_env_setting': None, 'tracer_enabled': True, 'sampler_type': 'DatadogSampler', 'priority_sampler_type': 'N/A', 'sampling_rules': [], 'service': 'moontest', 'debug': True, 'enabled_cli': False, 'analytics_enabled': False, 'log_injection_enabled': False, 'health_metrics_enabled': False, 'runtime_metrics_enabled': False, 'dd_version': '', 'global_tags': '', 'tracer_tags': '', 'integrations': {'protobuf': {'enabled': False, 'instrumented': False, 'module_version': '6.30.2', 'module_imported': False, 'config': None}}, 'partial_flush_enabled': True, 'partial_flush_min_spans': 300, 'asm_enabled': False, 'iast_enabled': False, 'waf_timeout': 5.0, 'remote_config_enabled': True, 'config_endpoint': {}, 'crashtracking_enabled': True, 'gitmetadata_enabled': True, 'git_repository_url': '', 'git_commit_sha': '', 'git_main_package': ''} ^CInstrumentation Telemetry sent 1315 bytes in 0.66476s to https://all-http-intake.logs.datad0g.com/api/v2/apmtelemetry. Event: app-started. Response: 202 Instrumentation Telemetry sent 998 bytes in 0.48419s to https://all-http-intake.logs.datad0g.com/api/v2/apmtelemetry. Event: app-product-change. Response: 202 Instrumentation Telemetry sent 11219 bytes in 1.07408s to https://all-http-intake.logs.datad0g.com/api/v2/apmtelemetry. Event: app-client-configuration-change. Response: 202 Instrumentation Telemetry sent 886 bytes in 0.45273s to https://all-http-intake.logs.datad0g.com/api/v2/apmtelemetry. Event: app-dependencies-loaded. Response: 202 Instrumentation Telemetry sent 690 bytes in 0.53659s to https://all-http-intake.logs.datad0g.com/api/v2/apmtelemetry. Event: app-closing. Response: 202 Instrumentation Telemetry sent 692 bytes in 1.41108s to https://all-http-intake.logs.datad0g.com/api/v2/apmtelemetry. Event: app-heartbeat. Response: 202 ``` ## Checklist - [x] PR author has checked that all the criteria below are met - The PR description includes an overview of the change - The PR description articulates the motivation for the change - The change includes tests OR the PR description describes a testing strategy - The PR description notes risks associated with the change, if any - Newly-added code is easy to change - The change follows the [library release note guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html) - The change includes or references documentation updates if necessary - Backport labels are set (if [applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)) ## Reviewer Checklist - [ ] Reviewer has checked that all the criteria below are met - Title is accurate - All changes are related to the pull request's stated goal - Avoids breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes - Testing strategy adequately addresses listed risks - Newly-added code is easy to change - Release note makes sense to a user of the library - If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment - 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)
1 parent 96417ff commit 8423d8f

File tree

17 files changed

+65
-104
lines changed

17 files changed

+65
-104
lines changed

ddtrace/_logger.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def configure_ddtrace_logger():
5757
def _configure_ddtrace_debug_logger(logger):
5858
if get_config("DD_TRACE_DEBUG", False, asbool):
5959
logger.setLevel(logging.DEBUG)
60-
logger.debug("debug mode has been enabled for the ddtrace logger")
6160

6261

6362
def _configure_ddtrace_file_logger(logger):

ddtrace/_trace/processor/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self) -> None:
4343
"""Default post initializer which logs the representation of the
4444
TraceProcessor at the ``logging.DEBUG`` level.
4545
"""
46-
log.debug("initialized trace processor %r", self)
46+
pass
4747

4848
@abc.abstractmethod
4949
def process_trace(self, trace: List[Span]) -> Optional[List[Span]]:
@@ -64,7 +64,7 @@ def __init__(self) -> None:
6464
"""Default post initializer which logs the representation of the
6565
Processor at the ``logging.DEBUG`` level.
6666
"""
67-
log.debug("initialized processor %r", self)
67+
pass
6868

6969
@abc.abstractmethod
7070
def on_span_start(self, span: Span) -> None:

ddtrace/_trace/tracer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,6 @@ def configure(
385385
if context_provider is not None:
386386
self.context_provider = context_provider
387387

388-
self._generate_diagnostic_logs()
389-
390388
def _generate_diagnostic_logs(self):
391389
if config._debug_mode or config._startup_logs_enabled:
392390
try:

ddtrace/bootstrap/preload.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ def register_post_preload(func: t.Callable) -> None:
4646

4747
# DEV: We want to start the crashtracker as early as possible
4848
if crashtracker_config.enabled:
49-
log.debug("crashtracking enabled via environment variable")
5049
try:
5150
from ddtrace.internal.core import crashtracking
5251

ddtrace/internal/debug.py

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ def collect(tracer):
5151
# type: (Tracer) -> Dict[str, Any]
5252
"""Collect system and library information into a serializable dict."""
5353

54+
# Inline expensive imports to avoid unnecessary overhead on startup.
55+
from ddtrace.internal import gitmetadata
5456
from ddtrace.internal.runtime.runtime_metrics import RuntimeWorker
57+
from ddtrace.settings.crashtracker import config as crashtracker_config
5558

5659
if isinstance(tracer._span_aggregator.writer, LogWriter):
5760
agent_url = "AGENTLESS"
@@ -70,7 +73,7 @@ def collect(tracer):
7073
agent_url = "CUSTOM"
7174
agent_error = None
7275

73-
sampler_rules = [str(rule) for rule in tracer._sampler.rules]
76+
sampling_rules = [str(rule) for rule in tracer._sampler.rules]
7477

7578
is_venv = in_venv()
7679

@@ -98,19 +101,13 @@ def collect(tracer):
98101
integration_configs[module] = dict(
99102
enabled=enabled,
100103
instrumented=module_instrumented,
101-
module_available=module_available,
102104
module_version=packages_available[module],
103105
module_imported=module_imported,
104106
config=config,
105107
)
106-
else:
107-
# Use N/A here to avoid the additional clutter of an entire
108-
# config dictionary for a module that isn't available.
109-
integration_configs[module] = "N/A"
110108

111109
pip_version = packages_available.get("pip", "N/A")
112-
113-
from ddtrace._trace.tracer import log
110+
git_repository_url, git_commit_sha, git_main_package = gitmetadata.get_git_tags()
114111

115112
return dict(
116113
# Timestamp UTC ISO 8601 with the trailing +00:00 removed
@@ -131,14 +128,10 @@ def collect(tracer):
131128
agent_error=agent_error,
132129
statsd_url=agent_config.dogstatsd_url,
133130
env=ddtrace.config.env or "",
134-
is_global_tracer=tracer == ddtrace.tracer,
135-
enabled_env_setting=os.getenv("DATADOG_TRACE_ENABLED"),
136-
tracer_enabled=tracer.enabled,
137-
sampler_type=type(tracer._sampler).__name__ if tracer._sampler else "N/A",
138-
priority_sampler_type="N/A",
139-
sampler_rules=sampler_rules,
131+
ddtrace_enabled=ddtrace.config._tracing_enabled,
132+
sampling_rules=sampling_rules,
140133
service=ddtrace.config.service or "",
141-
debug=log.isEnabledFor(logging.DEBUG),
134+
debug=logger.isEnabledFor(logging.DEBUG),
142135
enabled_cli="ddtrace" in os.getenv("PYTHONPATH", ""),
143136
log_injection_enabled=ddtrace.config._logs_injection,
144137
health_metrics_enabled=ddtrace.config._health_metrics_enabled,
@@ -153,6 +146,12 @@ def collect(tracer):
153146
iast_enabled=asm_config._iast_enabled,
154147
waf_timeout=asm_config._waf_timeout,
155148
remote_config_enabled=ddtrace.config._remote_config_enabled,
149+
config_endpoint=ddtrace.config._from_endpoint,
150+
crashtracking_enabled=crashtracker_config.enabled,
151+
gitmetadata_enabled=gitmetadata.config.enabled,
152+
git_repository_url=git_repository_url,
153+
git_commit_sha=git_commit_sha,
154+
git_main_package=git_main_package,
156155
)
157156

158157

@@ -199,7 +198,7 @@ class bcolors:
199198
DD Version: {dd_version}
200199
Global Tags: {global_tags}
201200
Tracer Tags: {tracer_tags}""".format(
202-
tracer_enabled=info.get("tracer_enabled"),
201+
tracer_enabled=info.get("ddtrace_enabled"),
203202
appsec_enabled=info.get("asm_enabled"),
204203
remote_config_enabled=info.get("remote_config_enabled"),
205204
iast_enabled=info.get("iast_enabled"),

ddtrace/internal/gitmetadata.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,11 @@ class GitMetadataConfig(DDConfig):
3333
tags = DDConfig.var(str, "tags", default="")
3434

3535

36-
def _get_tags_from_env(config):
37-
# type: (GitMetadataConfig) -> typing.Tuple[str, str, str]
36+
config = GitMetadataConfig()
37+
38+
39+
def _get_tags_from_env():
40+
# type: () -> typing.Tuple[str, str, str]
3841
"""
3942
Get git metadata from environment variables.
4043
Returns tuple (repository_url, commit_sha, main_package)
@@ -101,24 +104,17 @@ def get_git_tags():
101104
if _GITMETADATA_TAGS is not None:
102105
return _GITMETADATA_TAGS
103106

104-
config = GitMetadataConfig()
105-
106107
if config.enabled:
107-
repository_url, commit_sha, main_package = _get_tags_from_env(config)
108-
log.debug("git tags from env: %s %s %s", repository_url, commit_sha, main_package)
108+
repository_url, commit_sha, main_package = _get_tags_from_env()
109109
if main_package and (not repository_url or not commit_sha):
110110
# trying to extract repo URL and/or commit sha from the main package
111111
pkg_repository_url, pkg_commit_sha = _get_tags_from_package(main_package)
112-
log.debug("git tags from package: %s %s", pkg_repository_url, pkg_commit_sha)
113112
if not repository_url:
114113
repository_url = pkg_repository_url
115114
if not commit_sha:
116115
commit_sha = pkg_commit_sha
117-
118-
log.debug("git tags: %s %s", repository_url, commit_sha)
119116
_GITMETADATA_TAGS = repository_url, commit_sha, main_package
120117
else:
121-
log.debug("git tags disabled")
122118
_GITMETADATA_TAGS = ("", "", "")
123119
return _GITMETADATA_TAGS
124120
except Exception:

ddtrace/internal/remoteconfig/_subscribers.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ def _get_data_from_connector_and_exec(self) -> None:
3636

3737
def periodic(self):
3838
try:
39-
log.debug("[PID %d | PPID %d] %s is getting data", os.getpid(), os.getppid(), self)
4039
self._get_data_from_connector_and_exec()
41-
log.debug("[PID %d | PPID %d] %s got data", os.getpid(), os.getppid(), self)
4240
except Exception:
4341
log.error("[PID %d | PPID %d] %s while getting data", os.getpid(), os.getppid(), self, exc_info=True)
4442

ddtrace/internal/remoteconfig/client.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -294,12 +294,8 @@ def reset_products(self):
294294
def _send_request(self, payload: str) -> Optional[Mapping[str, Any]]:
295295
conn = None
296296
try:
297-
log.debug(
298-
"[%s][P: %s] Requesting RC data from products: %s", os.getpid(), os.getppid(), str(self._products)
299-
) # noqa: G200
300-
301297
if config.log_payloads:
302-
log.debug("[%s][P: %s] RC request payload: %s", os.getpid(), os.getppid(), payload) # noqa: G200
298+
log.debug("[%s][P: %s] RC request payload: %s", os.getpid(), os.getppid(), payload)
303299

304300
conn = agent.get_connection(self.agent_url, timeout=agent_config.trace_agent_timeout_seconds)
305301
conn.request("POST", REMOTE_CONFIG_AGENT_ENDPOINT, payload, self._headers)
@@ -311,11 +307,9 @@ def _send_request(self, payload: str) -> Optional[Mapping[str, Any]]:
311307
data = resp.read()
312308

313309
if config.log_payloads:
314-
log.debug(
315-
"[%s][P: %s] RC response payload: %s", os.getpid(), os.getppid(), data.decode("utf-8")
316-
) # noqa: G200
310+
log.debug("[%s][P: %s] RC response payload: %s", os.getpid(), os.getppid(), data.decode("utf-8"))
317311
except OSError as e:
318-
log.debug("Unexpected connection error in remote config client request: %s", str(e)) # noqa: G200
312+
log.debug("Unexpected connection error in remote config client request: %s", str(e))
319313
return None
320314
finally:
321315
if conn is not None:

ddtrace/internal/remoteconfig/worker.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def __init__(self):
3535
self._parent_id = os.getpid()
3636
self._products_to_restart_on_fork = set()
3737
self._capabilities_map: Dict[enum.IntFlag, str] = dict()
38-
log.debug("RemoteConfigWorker created with polling interval %d", ddconfig._remote_config_poll_interval)
3938

4039
def _agent_check(self) -> None:
4140
try:

ddtrace/internal/telemetry/writer.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,11 @@ def send_event(self, request: Dict) -> Optional[httplib.HTTPResponse]:
9898
resp = conn.getresponse()
9999
if resp.status < 300:
100100
log.debug(
101-
"Instrumentation Telemetry sent %d in %.5fs to %s. response: %s",
101+
"Instrumentation Telemetry sent %d bytes in %.5fs to %s. Event: %s. Response: %s",
102102
len(rb_json),
103103
sw.elapsed(),
104104
self.url,
105+
request["request_type"],
105106
resp.status,
106107
)
107108
else:

0 commit comments

Comments
 (0)