Skip to content

Commit f9689bf

Browse files
authored
chore(llmobs/experiments): disable tracing when tracing not explicitl… (#14111)
…y enabled When tracing isn't explicitly enabled then disable it to avoid noisy logs since APM doesn't support agentless.
1 parent 3162f35 commit f9689bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ddtrace/llmobs/_llmobs.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,10 @@ def enable(
516516
config._llmobs_ml_app = ml_app or config._llmobs_ml_app
517517
config._llmobs_instrumented_proxy_urls = instrumented_proxy_urls or config._llmobs_instrumented_proxy_urls
518518

519+
# FIXME: workaround to prevent noisy logs when using the experiments feature
520+
if config._dd_api_key and cls._app_key and os.environ.get("DD_TRACE_ENABLED", "").lower() not in ["true", "1"]:
521+
ddtrace.tracer.enabled = False
522+
519523
error = None
520524
start_ns = time.time_ns()
521525
try:

0 commit comments

Comments
 (0)