Skip to content

Commit 382f100

Browse files
tlhunterclaude
andcommitted
fix(process-discovery): simplify processTagsSerialized to use null directly
Address review feedback: use null instead of empty string for processTagsSerialized when disabled, removing redundant || null coercion. Fix test title to match assertion. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 031416d commit 382f100

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/dd-trace/src/tracer_metadata.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ function storeConfig (config) {
1515
const processTags = require('./process-tags')
1616

1717
const processTagsSerialized = config.propagateProcessTags?.enabled
18-
? (processTags.serialized || '')
19-
: ''
18+
? (processTags.serialized || null)
19+
: null
2020

2121
const metadata = new processDiscovery.TracerMetadata(
2222
config.tags['runtime-id'],
@@ -25,7 +25,7 @@ function storeConfig (config) {
2525
config.service || null,
2626
config.env || null,
2727
config.version || null,
28-
processTagsSerialized || null,
28+
processTagsSerialized,
2929
containerId || null
3030
)
3131

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ describe('tracer_metadata', () => {
6464
sinon.assert.calledOnce(storeMetadataStub)
6565
})
6666

67-
it('passes empty string for process_tags when propagateProcessTags is disabled', () => {
67+
it('passes null for process_tags when propagateProcessTags is disabled', () => {
6868
storeConfig({ ...baseConfig, propagateProcessTags: { enabled: false } })
6969

7070
const args = TracerMetadataStub.firstCall.args

0 commit comments

Comments
 (0)