Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion integration-tests/profiler/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ function busyWait (ms) {
}))
}

const tracer = require('dd-trace')
const durationMs = Number.parseInt(process.env.TEST_DURATION_MS ?? '500')
setImmediate(async () => busyWait(durationMs))
setImmediate(() => tracer.trace('test-operation', () => busyWait(durationMs)))
9 changes: 3 additions & 6 deletions integration-tests/profiler/profiler.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ describe('profiler', () => {

// Same number of requests and responses
assert.strictEqual(responses.points[0][1], requestCount)
}, 'generate-metrics', timeout)
}, 'generate-metrics', timeout, 1, true)

const checkDistributions = agent.assertTelemetryReceived(({ _, payload }) => {
const pp = payload.payload
Expand Down Expand Up @@ -748,9 +748,6 @@ describe('profiler', () => {
if (process.platform === 'win32') {
this.skip() // Wall profiler context count telemetry is not supported on Windows
}
if (process.platform === 'darwin') {
this.skip() // Test is flaky on macOS
}
proc = fork(profilerTestFile, {
cwd,
env: {
Expand All @@ -759,7 +756,7 @@ describe('profiler', () => {
DD_PROFILING_UPLOAD_PERIOD: '1',
DD_PROFILING_ASYNC_CONTEXT_FRAME_ENABLED: '1',
DD_TELEMETRY_HEARTBEAT_INTERVAL: '1', // every second
TEST_DURATION_MS: 1500,
TEST_DURATION_MS: 3000,
},
})

Expand All @@ -772,7 +769,7 @@ describe('profiler', () => {
assert.strictEqual(sampleContexts.type, 'gauge')
assert.ok(sampleContexts.points[0][1] >= 1)
})
}, 'generate-metrics', timeout)
}, 'generate-metrics', timeout, 1, true)

await Promise.all([checkProfiles(agent, proc, timeout), checkMetrics])
})
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
"@datadog/native-iast-taint-tracking": "4.1.0",
"@datadog/native-metrics": "3.1.1",
"@datadog/openfeature-node-server": "^1.1.0",
"@datadog/pprof": "5.13.5",
"@datadog/pprof": "5.14.0",
"@datadog/wasm-js-rewriter": "5.0.1",
"@opentelemetry/api": ">=1.0.0 <1.10.0",
"@opentelemetry/api-logs": "<1.0.0",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@
dependencies:
"@datadog/flagging-core" "1.1.0"

"@datadog/pprof@5.13.5":
version "5.13.5"
resolved "https://registry.yarnpkg.com/@datadog/pprof/-/pprof-5.13.5.tgz#36eea628f321ed512fe4ce440de4cffa2e056569"
integrity sha512-W0dvo91ff2EMQI9Vhv8PNM+w1ZWuClm1pBVdLB6y0bMB3+E+wEGg0VD1iNJxsuPbwDt5+yV0u3e4WkqK12Lzlg==
"@datadog/pprof@5.14.0":
version "5.14.0"
resolved "https://registry.yarnpkg.com/@datadog/pprof/-/pprof-5.14.0.tgz#a5a43fde3ca9369345994cc5cf82d5dcf743fb1c"
integrity sha512-bXYptMf0BY3NdKcAmX5aAOnozj7GFdNYE4SIdPF0/Q/Yfb2fYBIYZaN/Le6BhiDIepBvvH/H75d3EIFhB64kOw==
dependencies:
node-gyp-build "<4.0"
pprof-format "^2.2.1"
Expand Down
Loading