Skip to content

Commit 46aa1f0

Browse files
bm1549claude
andauthored
feat(config): enable startup logs by default (#7474)
* 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 <[email protected]> * 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) <[email protected]> * fix(config): update DD_TRACE_STARTUP_LOGS implementation level to C Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]> * 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) <[email protected]> * test(config): use DD_MAJOR to determine startupLogs default in tests Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
1 parent 5e82809 commit 46aa1f0

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

integration-tests/appsec/index.spec.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ describe('RASP', () => {
3737
DD_APPSEC_RASP_ENABLED: 'true',
3838
DD_APPSEC_RULES: path.join(cwd, 'appsec/rasp/rasp_rules.json'),
3939
DD_APPSEC_RASP_COLLECT_REQUEST_BODY: String(collectRequestBody),
40+
DD_TRACE_STARTUP_LOGS: 'false',
4041
},
4142
}, stdOutputHandler, stdOutputHandler)
4243
axios = Axios.create({ baseURL: proc.url })

packages/dd-trace/src/config/defaults.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
const pkg = require('../pkg')
44
const { isFalse, isTrue } = require('../util')
5+
const { DD_MAJOR } = require('../../../../version')
56
const { getEnvironmentVariable: getEnv } = require('./helper')
67

78
const {
@@ -117,6 +118,7 @@ const defaultsWithoutSupportedConfigurationEntry = {
117118
// TODO: These entries should be removed. They are off by default
118119
// because they rely on other configs.
119120
const defaultsWithConditionalRuntimeBehavior = {
121+
startupLogs: DD_MAJOR >= 6,
120122
isGitUploadEnabled: false,
121123
isImpactedTestsEnabled: false,
122124
isIntelligentTestRunnerEnabled: false,

packages/dd-trace/test/config/index.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ describe('Config', () => {
578578
{ name: 'spanAttributeSchema', value: 'v0', origin: 'default' },
579579
{ name: 'spanComputePeerService', value: false, origin: 'calculated' },
580580
{ name: 'spanRemoveIntegrationFromService', value: false, origin: 'default' },
581-
{ name: 'startupLogs', value: false, origin: 'default' },
581+
{ name: 'startupLogs', value: DD_MAJOR >= 6, origin: 'default' },
582582
{ name: 'stats.enabled', value: false, origin: 'calculated' },
583583
{ name: 'tagsHeaderMaxLength', value: 512, origin: 'default' },
584584
{ name: 'telemetry.debug', value: false, origin: 'default' },

0 commit comments

Comments
 (0)