Skip to content

Commit

Permalink
enable 128 bit trace id log injection by default
Browse files Browse the repository at this point in the history
  • Loading branch information
khanayan123 committed Feb 3, 2025
1 parent 386f4e7 commit 1c3e657
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/dd-trace/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ class Config {
this._setValue(defaults, 'telemetry.metrics', true)
this._setValue(defaults, 'traceEnabled', true)
this._setValue(defaults, 'traceId128BitGenerationEnabled', true)
this._setValue(defaults, 'traceId128BitLoggingEnabled', false)
this._setValue(defaults, 'traceId128BitLoggingEnabled', true)
this._setValue(defaults, 'tracePropagationExtractFirst', false)
this._setValue(defaults, 'tracePropagationStyle.inject', ['datadog', 'tracecontext', 'baggage'])
this._setValue(defaults, 'tracePropagationStyle.extract', ['datadog', 'tracecontext', 'baggage'])
Expand Down
3 changes: 2 additions & 1 deletion packages/dd-trace/src/telemetry/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,8 @@ function updateConfig (changes, config) {
service: 'DD_SERVICE',
clientIpHeader: 'DD_TRACE_CLIENT_IP_HEADER',
'grpc.client.error.statuses': 'DD_GRPC_CLIENT_ERROR_STATUSES',
'grpc.server.error.statuses': 'DD_GRPC_SERVER_ERROR_STATUSES'
'grpc.server.error.statuses': 'DD_GRPC_SERVER_ERROR_STATUSES',
traceId128BitLoggingEnabled: 'DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED'
}

const namesNeedFormatting = new Set(['DD_TAGS', 'peerServiceMapping', 'serviceMapping'])
Expand Down
4 changes: 2 additions & 2 deletions packages/dd-trace/test/config.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ describe('Config', () => {
expect(config).to.have.nested.deep.property('dynamicInstrumentation.redactedIdentifiers', [])
expect(config).to.have.nested.deep.property('dynamicInstrumentation.redactionExcludedIdentifiers', [])
expect(config).to.have.property('traceId128BitGenerationEnabled', true)
expect(config).to.have.property('traceId128BitLoggingEnabled', false)
expect(config).to.have.property('traceId128BitLoggingEnabled', true)
expect(config).to.have.property('spanAttributeSchema', 'v0')
expect(config.grpc.client.error.statuses).to.deep.equal(GRPC_CLIENT_ERROR_STATUSES)
expect(config.grpc.server.error.statuses).to.deep.equal(GRPC_SERVER_ERROR_STATUSES)
Expand Down Expand Up @@ -392,7 +392,7 @@ describe('Config', () => {
{ name: 'telemetry.logCollection', value: true, origin: 'default' },
{ name: 'telemetry.metrics', value: true, origin: 'default' },
{ name: 'traceId128BitGenerationEnabled', value: true, origin: 'default' },
{ name: 'traceId128BitLoggingEnabled', value: false, origin: 'default' },
{ name: 'traceId128BitLoggingEnabled', value: true, origin: 'default' },
{ name: 'tracing', value: true, origin: 'default' },
{ name: 'url', value: undefined, origin: 'default' },
{ name: 'version', value: '', origin: 'default' }
Expand Down

0 comments on commit 1c3e657

Please sign in to comment.