Skip to content

Commit a532c6a

Browse files
committed
migrate DD_TRACE_ENCODING_DEBUG and DD_TRACE_EXPERIMENTAL_STATE_TRACKING
1 parent 3e0b148 commit a532c6a

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

packages/dd-trace/src/config_stable.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class StableConfig {
1717
return
1818
}
1919

20+
// cache the file reads
2021
const localConfig = this._readConfigFromPath(localConfigPath)
2122
const fleetConfig = this._readConfigFromPath(fleetConfigPath)
2223
if (!localConfig && !fleetConfig) {

packages/dd-trace/src/encode/0.4.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { MsgpackChunk, MsgpackEncoder } = require('../msgpack')
55
const log = require('../log')
66
const { isTrue } = require('../util')
77
const { memoize } = require('../log/utils')
8-
const { getEnvironmentVariable } = require('../config-helper')
8+
const { getResolvedEnv } = require('../config-env-sources')
99

1010
const SOFT_LIMIT = 8 * 1024 * 1024 // 8MB
1111

@@ -33,7 +33,7 @@ class AgentEncoder {
3333
this._reset()
3434
// Use getEnvironmentVariable instead of getResolvedEnv to avoid triggering async_hooks during span processing
3535
// TODO: This needs to be supported by stable config, though...
36-
this._debugEncoding = isTrue(getEnvironmentVariable('DD_TRACE_ENCODING_DEBUG'))
36+
this._debugEncoding = isTrue(getResolvedEnv('DD_TRACE_ENCODING_DEBUG'))
3737
this._config = this._writer?._config
3838
}
3939

packages/dd-trace/src/span_processor.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const log = require('./log')
44
const spanFormat = require('./span_format')
55
const SpanSampler = require('./span_sampler')
66
const GitMetadataTagger = require('./git_metadata_tagger')
7-
const { getEnvironmentVariable } = require('./config-helper')
7+
const { getResolvedEnv } = require('./config-env-sources')
88

99
const startedSpans = new WeakSet()
1010
const finishedSpans = new WeakSet()
@@ -85,7 +85,7 @@ class SpanProcessor {
8585
_erase (trace, active) {
8686
// Use getEnvironmentVariable instead of getResolvedEnv to avoid triggering async_hooks during span processing
8787
// TODO: This needs to be supported by stable config, though...
88-
if (getEnvironmentVariable('DD_TRACE_EXPERIMENTAL_STATE_TRACKING') === 'true') {
88+
if (getResolvedEnv('DD_TRACE_EXPERIMENTAL_STATE_TRACKING') === 'true') {
8989
const started = new Set()
9090
const startedIds = new Set()
9191
const finished = new Set()

0 commit comments

Comments
 (0)