Skip to content

Commit

Permalink
PROF-10330: Slim SSI metadata from 3 elements to 2 (#4620)
Browse files Browse the repository at this point in the history
  • Loading branch information
szegedi authored Aug 27, 2024
1 parent a04ba3f commit 6fabbd0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
6 changes: 1 addition & 5 deletions integration-tests/profiler/profiler.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ function expectProfileMessagePromise (agent, timeout,
event = JSON.parse(files[0].buffer.toString())
assert.propertyVal(event, 'family', 'node')
assert.isString(event.info.profiler.activation)
const ssiEnabled = event.info.profiler.ssi.enabled
assert.isBoolean(ssiEnabled)
if (ssiEnabled) {
assert.isString(event.info.profiler.ssi.mechanism)
}
assert.isString(event.info.profiler.ssi.mechanism)
assert.deepPropertyVal(event, 'attachments', fileNames)
for (const [index, fileName] of fileNames.entries()) {
assert.propertyVal(files[index + 1], 'originalname', fileName)
Expand Down
3 changes: 1 addition & 2 deletions packages/dd-trace/src/profiling/exporters/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ class AgentExporter {
profiler: {
activation: this._activation,
ssi: {
enabled: this._libraryInjected,
mechanism: this._libraryInjected ? 'injected_agent' : undefined
mechanism: this._libraryInjected ? 'injected_agent' : 'none'
},
version
},
Expand Down
2 changes: 1 addition & 1 deletion packages/dd-trace/test/profiling/exporters/agent.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ describe('exporters/agent', function () {
expect(Object.keys(event.info.profiler)).to.have.length(3)
expect(event.info.profiler).to.have.property('activation', 'unknown')
expect(event.info.profiler).to.have.property('ssi')
expect(event.info.profiler.ssi).to.have.property('enabled', false)
expect(event.info.profiler.ssi).to.have.property('mechanism', 'none')
expect(event.info.profiler).to.have.property('version', version)
expect(event.info).to.have.property('runtime')
expect(Object.keys(event.info.runtime)).to.have.length(2)
Expand Down

0 comments on commit 6fabbd0

Please sign in to comment.