Skip to content

Commit dcfd59b

Browse files
szegediBridgeAR
authored andcommitted
fix(profiler): re-add missing configurations (#6302)
1 parent cae31e7 commit dcfd59b

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

packages/dd-trace/src/supported-configurations.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@
118118
"DD_PLAYWRIGHT_WORKER": ["A"],
119119
"DD_PROFILING_CODEHOTSPOTS_ENABLED": ["A"],
120120
"DD_PROFILING_CPU_ENABLED": ["A"],
121+
"DD_PROFILING_DEBUG_SOURCE_MAPS": ["A"],
121122
"DD_PROFILING_DEBUG_UPLOAD_COMPRESSION": ["A"],
122123
"DD_PROFILING_ENABLED": ["A"],
123124
"DD_PROFILING_ENDPOINT_COLLECTION_ENABLED": ["A"],
@@ -127,10 +128,13 @@
127128
"DD_PROFILING_EXPERIMENTAL_OOM_MONITORING_ENABLED": ["A"],
128129
"DD_PROFILING_EXPORTERS": ["A"],
129130
"DD_PROFILING_HEAP_ENABLED": ["A"],
131+
"DD_PROFILING_HEAP_SAMPLING_INTERVAL": ["A"],
132+
"DD_PROFILING_PPROF_PREFIX": ["A"],
130133
"DD_PROFILING_PROFILERS": ["A"],
131134
"DD_PROFILING_SOURCE_MAP": ["A"],
132135
"DD_PROFILING_TIMELINE_ENABLED": ["A"],
133136
"DD_PROFILING_UPLOAD_PERIOD": ["A"],
137+
"DD_PROFILING_UPLOAD_TIMEOUT": ["A"],
134138
"DD_PROFILING_V8_PROFILER_BUG_WORKAROUND": ["A"],
135139
"DD_PROFILING_WALLTIME_ENABLED": ["A"],
136140
"DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS": ["A"],

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

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,30 @@ describe('config', () => {
176176
expect(config.profilers[0]).to.be.an.instanceOf(SpaceProfiler)
177177
})
178178

179+
it('should be able to read some env vars', () => {
180+
const oldenv = process.env
181+
process.env = {
182+
DD_PROFILING_DEBUG_SOURCE_MAPS: '1',
183+
DD_PROFILING_HEAP_SAMPLING_INTERVAL: '1000',
184+
DD_PROFILING_PPROF_PREFIX: 'test-prefix',
185+
DD_PROFILING_UPLOAD_TIMEOUT: '10000',
186+
DD_PROFILING_TIMELINE_ENABLED: '0'
187+
}
188+
189+
const options = {
190+
logger: nullLogger
191+
}
192+
193+
const config = new Config(options)
194+
expect(config.debugSourceMaps).to.be.true
195+
expect(config.heapSamplingInterval).to.equal(1000)
196+
expect(config.pprofPrefix).to.equal('test-prefix')
197+
expect(config.uploadTimeout).to.equal(10000)
198+
expect(config.timelineEnabled).to.be.false
199+
200+
process.env = oldenv
201+
})
202+
179203
it('should deduplicate profilers', () => {
180204
process.env = {
181205
DD_PROFILING_PROFILERS: 'wall,wall',

0 commit comments

Comments
 (0)