Skip to content

Commit 29ee4f3

Browse files
author
Jordi Bertran de Balanda
committed
move to better tracer option name
1 parent 1bf8be1 commit 29ee4f3

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

packages/dd-trace/src/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ class Config {
351351
)
352352

353353
const DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED = coalesce(
354-
options.flattenIntegrationServiceNames,
354+
options.spanRemoveIntegrationFromService,
355355
isTrue(process.env.DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED)
356356
)
357357
const DD_TRACE_X_DATADOG_TAGS_MAX_LENGTH = coalesce(
@@ -585,7 +585,7 @@ ken|consumer_?(?:id|key|secret)|sign(?:ed|ature)?|auth(?:entication|orization)?)
585585
}
586586
this.spanAttributeSchema = DD_TRACE_SPAN_ATTRIBUTE_SCHEMA
587587
this.spanComputePeerService = DD_TRACE_PEER_SERVICE_DEFAULTS_ENABLED
588-
this.flattenIntegrationServiceNames = DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED
588+
this.spanRemoveIntegrationFromService = DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED
589589
this.peerServiceMapping = DD_TRACE_PEER_SERVICE_MAPPING
590590
this.lookup = options.lookup
591591
this.startupLogs = isTrue(DD_TRACE_STARTUP_LOGS)

packages/dd-trace/src/service-naming/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { schemaDefinitions } = require('./schemas')
33
class SchemaManager {
44
constructor () {
55
this.schemas = schemaDefinitions
6-
this.config = { spanAttributeSchema: 'v0', flattenIntegrationServiceNames: false }
6+
this.config = { spanAttributeSchema: 'v0', spanRemoveIntegrationFromService: false }
77
}
88

99
get schema () {
@@ -15,7 +15,7 @@ class SchemaManager {
1515
}
1616

1717
get shouldUseConsistentServiceNaming () {
18-
return this.config.flattenIntegrationServiceNames && this.version === 'v0'
18+
return this.config.spanRemoveIntegrationFromService && this.version === 'v0'
1919
}
2020

2121
opName (type, kind, plugin, ...opNameArgs) {

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ describe('Config', () => {
9393
expect(config).to.have.property('traceId128BitLoggingEnabled', false)
9494
expect(config).to.have.property('spanAttributeSchema', 'v0')
9595
expect(config).to.have.property('spanComputePeerService', false)
96-
expect(config).to.have.property('flattenIntegrationServiceNames', false)
96+
expect(config).to.have.property('spanRemoveIntegrationFromService', false)
9797
expect(config).to.have.deep.property('serviceMapping', {})
9898
expect(config).to.have.nested.deep.property('tracePropagationStyle.inject', ['tracecontext', 'datadog'])
9999
expect(config).to.have.nested.deep.property('tracePropagationStyle.extract', ['tracecontext', 'datadog'])
@@ -239,7 +239,7 @@ describe('Config', () => {
239239
expect(config).to.have.property('traceId128BitGenerationEnabled', true)
240240
expect(config).to.have.property('traceId128BitLoggingEnabled', true)
241241
expect(config).to.have.property('spanAttributeSchema', 'v1')
242-
expect(config).to.have.property('flattenIntegrationServiceNames', true)
242+
expect(config).to.have.property('spanRemoveIntegrationFromService', true)
243243
expect(config).to.have.property('spanComputePeerService', true)
244244
expect(config.tags).to.include({ foo: 'bar', baz: 'qux' })
245245
expect(config.tags).to.include({ service: 'service', 'version': '1.0.0', 'env': 'test' })
@@ -378,7 +378,7 @@ describe('Config', () => {
378378
],
379379
spanAttributeSchema: 'v1',
380380
spanComputePeerService: true,
381-
flattenIntegrationServiceNames: true,
381+
spanRemoveIntegrationFromService: true,
382382
peerServiceMapping: {
383383
d: 'dd'
384384
},
@@ -447,7 +447,7 @@ describe('Config', () => {
447447
expect(config).to.have.property('logLevel', logLevel)
448448
expect(config).to.have.property('traceId128BitGenerationEnabled', true)
449449
expect(config).to.have.property('traceId128BitLoggingEnabled', true)
450-
expect(config).to.have.property('flattenIntegrationServiceNames', true)
450+
expect(config).to.have.property('spanRemoveIntegrationFromService', true)
451451
expect(config).to.have.property('spanComputePeerService', true)
452452
expect(config).to.have.deep.property('peerServiceMapping', { d: 'dd' })
453453
expect(config).to.have.property('tags')
@@ -677,7 +677,7 @@ describe('Config', () => {
677677
},
678678
spanAttributeSchema: 'v1',
679679
spanComputePeerService: true,
680-
flattenIntegrationServiceNames: true,
680+
spanRemoveIntegrationFromService: true,
681681
peerServiceMapping: {
682682
d: 'dd'
683683
},
@@ -736,7 +736,7 @@ describe('Config', () => {
736736
expect(config.tags).to.include({ service: 'test', version: '1.0.0', env: 'development' })
737737
expect(config).to.have.deep.property('serviceMapping', { b: 'bb' })
738738
expect(config).to.have.property('spanAttributeSchema', 'v1')
739-
expect(config).to.have.property('flattenIntegrationServiceNames', true)
739+
expect(config).to.have.property('spanRemoveIntegrationFromService', true)
740740
expect(config).to.have.property('spanComputePeerService', true)
741741
expect(config).to.have.deep.property('peerServiceMapping', { d: 'dd' })
742742
expect(config).to.have.nested.deep.property('tracePropagationStyle.inject', [])

packages/dd-trace/test/setup/mocha.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function withNamingSchema (spanProducerFn, expectedOpName, expectedServiceName,
8686
Nomenclature.configure({
8787
spanAttributeSchema: 'v0',
8888
service: fullConfig.service,
89-
flattenIntegrationServiceNames: true
89+
spanRemoveIntegrationFromService: true
9090
})
9191
})
9292
after(() => {

0 commit comments

Comments
 (0)