dd-trace-py icon indicating copy to clipboard operation
dd-trace-py copied to clipboard

chore(tracer): explicitly set DD_TRACE_DEBUG to Warning

Open rachelyangdog opened this issue 6 months ago • 4 comments

Turning debug off gives you a guaranteed “quiet” logger: only warnings and errors from ddtrace will ever appear, no matter what your root logger level is.

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
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • [x] 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 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

rachelyangdog avatar May 08 '25 16:05 rachelyangdog

CODEOWNERS have been resolved as:

ddtrace/_logger.py                                                      @DataDog/apm-core-python

github-actions[bot] avatar May 08 '25 16:05 github-actions[bot]

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 236 ± 3 ms.

The average import time from base is: 238 ± 2 ms.

The import time difference between this PR and base is: -2.3 ± 0.1 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 2.039 ms (0.87%)
ddtrace.bootstrap.sitecustomize 1.375 ms (0.58%)
ddtrace.bootstrap.preload 1.375 ms (0.58%)
ddtrace.internal.remoteconfig.client 0.648 ms (0.28%)
ddtrace 0.664 ms (0.28%)
ddtrace.internal._unpatched 0.023 ms (0.01%)

github-actions[bot] avatar May 08 '25 16:05 github-actions[bot]

Benchmarks

Benchmark execution time: 2025-06-02 19:22:28

Comparing candidate commit 5d0061d01cde179c15257f9ccd9a39460b99ab0f in PR branch rachel.yang/debug-logger with baseline commit a6520bc29637a764f522c80dd0c51a3e6608749c in branch main.

Found 0 performance improvements and 2 performance regressions! Performance is the same for 503 metrics, 3 unstable metrics.

scenario:iastaspectsospath-ospathnormcase_aspect

  • 🟥 execution_time [+403.136ns; +457.798ns] or [+11.688%; +13.272%]

scenario:iastaspectsospath-ospathsplitdrive_aspect

  • 🟥 execution_time [+357.868ns; +405.963ns] or [+9.821%; +11.140%]

pr-commenter[bot] avatar May 08 '25 16:05 pr-commenter[bot]

Datadog Summary

❌ Pipelines

Next Steps

The following jobs failed due to platform errors:

Import analysis / Bootstrap import analysis
Could not find `Cargo.toml` in the repository path, causing the import analysis to fail.
Changelog / Validate changelog
Release note not found during changelog validation. Use 'reno new ' to add one, or label 'changelog/no-changelog' to skip validation.

Was this helpful? Give us feedback!

This pull request has been automatically closed after a period of inactivity. After this much time, it will likely be easier to open a new pull request with the same changes than to update this one from the base branch. Please comment or reopen if you think this pull request was closed in error.

github-actions[bot] avatar Jul 12 '25 00:07 github-actions[bot]