chore: replace getValueFromEnvSources calls with config usage#8084
chore: replace getValueFromEnvSources calls with config usage#8084
Conversation
The config should be used directly, otherwise we duplicate the work.
Overall package sizeSelf size: 5.56 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.1 | 82.56 kB | 817.39 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8084 +/- ##
==========================================
- Coverage 73.74% 73.66% -0.08%
==========================================
Files 782 782
Lines 36354 36316 -38
==========================================
- Hits 26809 26753 -56
- Misses 9545 9563 +18
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 6512ed4 | Docs | Datadog PR Page | Give us feedback! |
BenchmarksBenchmark execution time: 2026-04-24 14:27:09 Comparing candidate commit 6512ed4 in PR branch Found 25 performance improvements and 4 performance regressions! Performance is the same for 1312 metrics, 103 unstable metrics. scenario:encoders-0.5-22
scenario:encoders-0.5-24
scenario:runtime-metrics-with-runtime-metrics-22
scenario:spans-finish-immediately-18
scenario:spans-finish-immediately-20
scenario:spans-finish-immediately-22
scenario:spans-finish-immediately-24
scenario:spans-finish-later-18
scenario:spans-finish-later-20
scenario:spans-finish-later-22
scenario:spans-finish-later-24
|
Made-with: Cursor
The previous full-close between loads was too aggressive: tests that
load a base set of plugins once (e.g., the IAST helper loads `http`)
and then call `agent.load('<other>')` per test relied on the first
load's subscriptions remaining active. Disabling everything broke
those (AppSec/ldapjs).
Now only disable old instances of the plugins being re-loaded. That
still clears the stale `_tracerConfig` for tests that toggle env
between loads (aws-sdk kinesis Disabled case) while leaving unrelated
plugins alone.
Made-with: Cursor
Disabled-at-runtime scenarios (tests toggle `DD_TRACE_AWS_SDK_<service>_ENABLED=false` after the tracer is already running) can't be satisfied by reading from the Config singleton, which is frozen at init. Revert the previous migration and restore the `getValueFromEnvSources` read for now. Also revert the speculative plugin-cleanup that was added to agent.load(): it breaks tests that rely on nested loads sharing an outer load's plugin subscriptions (e.g., the IAST helper loads 'http' once, then per-test loads other plugins). Made-with: Cursor
The Config-backed lookup is behaviorally identical, but it seems to disturb the mongodb test timing enough that the heartbeat span occasionally arrives before the insert. Revert to the original fallthrough to unblock CI; the underlying test flakiness can be addressed separately. Made-with: Cursor
…nabled" This reverts commit 780b2f7.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: af1d6a258f
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
The config should be used directly, otherwise we duplicate the work. This improves runtime in some spots slightly as seen in the benchmarks.
The config should be used directly, otherwise we duplicate the work.