Skip to content

Commit aa7ca3b

Browse files
authored
Code hotspots and endpoint collection now enabled by default (#3940)
1 parent 5c019ea commit aa7ca3b

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

packages/dd-trace/src/profiling/config.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class Config {
9898
this.debugSourceMaps = isTrue(coalesce(options.debugSourceMaps, DD_PROFILING_DEBUG_SOURCE_MAPS, false))
9999
this.endpointCollectionEnabled = isTrue(coalesce(options.endpointCollection,
100100
DD_PROFILING_ENDPOINT_COLLECTION_ENABLED,
101-
DD_PROFILING_EXPERIMENTAL_ENDPOINT_COLLECTION_ENABLED, false))
101+
DD_PROFILING_EXPERIMENTAL_ENDPOINT_COLLECTION_ENABLED, true))
102102
logExperimentalVarDeprecation('ENDPOINT_COLLECTION_ENABLED')
103103

104104
this.pprofPrefix = pprofPrefix
@@ -148,7 +148,7 @@ class Config {
148148

149149
this.codeHotspotsEnabled = isTrue(coalesce(options.codeHotspotsEnabled,
150150
DD_PROFILING_CODEHOTSPOTS_ENABLED,
151-
DD_PROFILING_EXPERIMENTAL_CODEHOTSPOTS_ENABLED, false))
151+
DD_PROFILING_EXPERIMENTAL_CODEHOTSPOTS_ENABLED, true))
152152
logExperimentalVarDeprecation('CODEHOTSPOTS_ENABLED')
153153

154154
this.cpuProfilingEnabled = isTrue(coalesce(options.cpuProfilingEnabled,

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

+3-5
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ describe('config', () => {
4848
expect(config.logger).to.be.an.instanceof(ConsoleLogger)
4949
expect(config.exporters[0]).to.be.an.instanceof(AgentExporter)
5050
expect(config.profilers[0]).to.be.an.instanceof(WallProfiler)
51-
expect(config.profilers[0].codeHotspotsEnabled()).false
51+
expect(config.profilers[0].codeHotspotsEnabled()).true
5252
expect(config.profilers[1]).to.be.an.instanceof(SpaceProfiler)
5353
expect(config.v8ProfilerBugWorkaroundEnabled).true
5454
expect(config.cpuProfilingEnabled).false
@@ -63,7 +63,7 @@ describe('config', () => {
6363
exporters: 'agent,file',
6464
profilers: 'space,wall',
6565
url: 'http://localhost:1234/',
66-
codeHotspotsEnabled: true
66+
codeHotspotsEnabled: false
6767
}
6868

6969
const config = new Config(options)
@@ -86,7 +86,7 @@ describe('config', () => {
8686
expect(config.profilers.length).to.equal(2)
8787
expect(config.profilers[0]).to.be.an.instanceOf(SpaceProfiler)
8888
expect(config.profilers[1]).to.be.an.instanceOf(WallProfiler)
89-
expect(config.profilers[1].codeHotspotsEnabled()).true
89+
expect(config.profilers[1].codeHotspotsEnabled()).false
9090
})
9191

9292
it('should filter out invalid profilers', () => {
@@ -130,7 +130,6 @@ describe('config', () => {
130130
it('should support profiler config with DD_PROFILING_PROFILERS', () => {
131131
process.env = {
132132
DD_PROFILING_PROFILERS: 'wall',
133-
DD_PROFILING_CODEHOTSPOTS_ENABLED: '1',
134133
DD_PROFILING_V8_PROFILER_BUG_WORKAROUND: '0',
135134
DD_PROFILING_EXPERIMENTAL_CPU_ENABLED: '1'
136135
}
@@ -184,7 +183,6 @@ describe('config', () => {
184183
it('should prioritize options over env variables', () => {
185184
process.env = {
186185
DD_PROFILING_PROFILERS: 'space',
187-
DD_PROFILING_CODEHOTSPOTS_ENABLED: '1',
188186
DD_PROFILING_ENDPOINT_COLLECTION_ENABLED: '1'
189187
}
190188
const options = {

0 commit comments

Comments
 (0)