feat(config): enable startup logs by default#7474
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #7474 +/- ##
==========================================
+ Coverage 80.23% 80.45% +0.22%
==========================================
Files 748 748
Lines 32405 32412 +7
==========================================
+ Hits 25999 26078 +79
+ Misses 6406 6334 -72
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:
|
Overall package sizeSelf size: 4.97 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.0 | 81.15 kB | 815.98 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
This comment has been minimized.
This comment has been minimized.
Changed the default value of startupLogs from false to true. Startup logs provide helpful diagnostic information about tracer configuration and should be enabled by default to improve observability and debugging experience. Changes: - Updated supported-configurations.json to set startupLogs default to true - Updated config test expectations to reflect new default Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
b04e3d1 to
294f91f
Compare
BenchmarksBenchmark execution time: 2026-03-18 15:34:35 Comparing candidate commit 63a1ba1 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 232 metrics, 28 unstable metrics. |
The startup log line was being captured by the stdioHandler and triggering "Unexpected output in stdout/stderr after blocking request" assertion failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
-1 on this, but either way, we implement breaking changes with version checks like so: if (libVersion.major >= 6) {
default = true
} else {
default = false
}this is due to us having to maintain multiple release branches at the same time, and making the breaking changes without this system would result in constant merge conflicts. |
rochdev
left a comment
There was a problem hiding this comment.
Breaking changes must be behind a flag as we share code between versions.
Not related to the code but still worth mentioning: our current tooling also struggles with the semver-major label. It's something we plan to address soon, but in the meantime this should be moved to semver-minor and added to the 6.0.0 milestone so we list it properly in the breaking changes in the next release.
Breaking changes must be behind a version flag since code is shared between versions. Keep supported-configurations.json default as false and override in defaults.js with DD_MAJOR >= 6 so v5 retains the original behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
| DD_APPSEC_RASP_ENABLED: 'true', | ||
| DD_APPSEC_RULES: path.join(cwd, 'appsec/rasp/rasp_rules.json'), | ||
| DD_APPSEC_RASP_COLLECT_REQUEST_BODY: String(collectRequestBody), | ||
| DD_TRACE_STARTUP_LOGS: 'false', |
There was a problem hiding this comment.
This appsec test makes sure that no logs exist when blocking a request. Rather than patching it to ignore the DD startup log, this seemed more correct
BridgeAR
left a comment
There was a problem hiding this comment.
I am happy to see this coming soon for v6
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(config): enable startup logs by default Changed the default value of startupLogs from false to true. Startup logs provide helpful diagnostic information about tracer configuration and should be enabled by default to improve observability and debugging experience. Changes: - Updated supported-configurations.json to set startupLogs default to true - Updated config test expectations to reflect new default Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(test): disable startup logs in RASP integration tests The startup log line was being captured by the stdioHandler and triggering "Unexpected output in stdout/stderr after blocking request" assertion failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(config): update DD_TRACE_STARTUP_LOGS implementation level to C Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(config): gate startup logs default behind DD_MAJOR version check Breaking changes must be behind a version flag since code is shared between versions. Keep supported-configurations.json default as false and override in defaults.js with DD_MAJOR >= 6 so v5 retains the original behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * test(config): use DD_MAJOR to determine startupLogs default in tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(config): enable startup logs by default Changed the default value of startupLogs from false to true. Startup logs provide helpful diagnostic information about tracer configuration and should be enabled by default to improve observability and debugging experience. Changes: - Updated supported-configurations.json to set startupLogs default to true - Updated config test expectations to reflect new default Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(test): disable startup logs in RASP integration tests The startup log line was being captured by the stdioHandler and triggering "Unexpected output in stdout/stderr after blocking request" assertion failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(config): update DD_TRACE_STARTUP_LOGS implementation level to C Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(config): gate startup logs default behind DD_MAJOR version check Breaking changes must be behind a version flag since code is shared between versions. Keep supported-configurations.json default as false and override in defaults.js with DD_MAJOR >= 6 so v5 retains the original behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * test(config): use DD_MAJOR to determine startupLogs default in tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
What does this PR do?
Enable startup logs by default for dd-trace v6+, gated behind a
DD_MAJOR >= 6version check so the change is safely backportable to v5.Motivation
Startup logs provide helpful diagnostic information about tracer configuration. Currently they must be explicitly enabled via
DD_TRACE_STARTUP_LOGS=true. By enabling them by default, we make it easier for users to diagnose configuration issues and understand their tracer setup.Main benefits:
Additional Notes
DD_MAJOR >= 6indefaults.jsso it is safely backportable (v5 retainsstartupLogs: false)supported-configurations.jsonkeeps the canonical default asfalse(implementation levelD), with the runtime override indefaultsWithConditionalRuntimeBehaviorDD_TRACE_STARTUP_LOGS=falseTest plan:
DD_TRACE_STARTUP_LOGS=falseto avoid interference🤖 Generated with Claude Code