File tree Expand file tree Collapse file tree 3 files changed +20
-14
lines changed
packages/dd-trace/src/profiling/profilers Expand file tree Collapse file tree 3 files changed +20
-14
lines changed Original file line number Diff line number Diff line change 117
117
"@datadog/native-appsec" : " 10.2.1" ,
118
118
"@datadog/native-iast-taint-tracking" : " 4.0.0" ,
119
119
"@datadog/native-metrics" : " 3.1.1" ,
120
- "@datadog/pprof" : " 5.9 .0" ,
120
+ "@datadog/pprof" : " 5.10 .0" ,
121
121
"@datadog/sketches-js" : " 2.1.1" ,
122
122
"@datadog/wasm-js-rewriter" : " 4.0.1" ,
123
123
"@isaacs/ttlcache" : " ^1.4.1" ,
138
138
"mutexify" : " ^1.4.0" ,
139
139
"opentracing" : " >=0.14.7" ,
140
140
"path-to-regexp" : " ^0.1.12" ,
141
- "pprof-format" : " ^2.1.0 " ,
141
+ "pprof-format" : " ^2.1.1 " ,
142
142
"protobufjs" : " ^7.5.3" ,
143
143
"retry" : " ^0.13.1" ,
144
144
"rfdc" : " ^1.4.1" ,
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ const {
13
13
getThreadLabels,
14
14
encodeProfileAsync
15
15
} = require ( './shared' )
16
+ const TRACE_ENDPOINT_LABEL = 'trace endpoint'
16
17
17
18
const { isWebServerSpan, endpointNameFromTags, getStartedSpans } = require ( '../webspan-utils' )
18
19
@@ -251,7 +252,12 @@ class NativeWallProfiler {
251
252
this . _enter ( )
252
253
this . _lastSampleCount = 0
253
254
}
254
- const profile = this . _pprof . time . stop ( restart , this . _generateLabels )
255
+
256
+ // Mark thread labels and trace endpoint label as good deduplication candidates
257
+ const lowCardinalityLabels = Object . keys ( getThreadLabels ( ) )
258
+ lowCardinalityLabels . push ( TRACE_ENDPOINT_LABEL )
259
+
260
+ const profile = this . _pprof . time . stop ( restart , this . _generateLabels , lowCardinalityLabels )
255
261
256
262
if ( restart ) {
257
263
const v8BugDetected = this . _pprof . time . v8ProfilerStuckEventLoopDetected ( )
@@ -312,10 +318,10 @@ class NativeWallProfiler {
312
318
labels [ LOCAL_ROOT_SPAN_ID_LABEL ] = rootSpanId
313
319
}
314
320
if ( webTags !== undefined && Object . keys ( webTags ) . length !== 0 ) {
315
- labels [ 'trace endpoint' ] = endpointNameFromTags ( webTags )
321
+ labels [ TRACE_ENDPOINT_LABEL ] = endpointNameFromTags ( webTags )
316
322
} else if ( endpoint ) {
317
323
// fallback to endpoint computed when sample was taken
318
- labels [ 'trace endpoint' ] = endpoint
324
+ labels [ TRACE_ENDPOINT_LABEL ] = endpoint
319
325
}
320
326
321
327
return labels
Original file line number Diff line number Diff line change 239
239
node-addon-api "^6.1.0"
240
240
node-gyp-build "^3.9.0"
241
241
242
- " @datadog/pprof@5.9 .0 " :
243
- version "5.9 .0"
244
- resolved "https://registry.yarnpkg.com/@datadog/pprof/-/pprof-5.9 .0.tgz#beacd1507304e3490900ff39ea108e7ea772921b "
245
- integrity sha512-7KretVkHUANWe31u9cGJpxmUkyrXsCD+fmlZQUz/zk9mtQNC4uBIKX53VUFfrVj/bxAhEEIPw5XTYiMc5RJLsw ==
242
+ " @datadog/pprof@5.10 .0 " :
243
+ version "5.10 .0"
244
+ resolved "https://registry.yarnpkg.com/@datadog/pprof/-/pprof-5.10 .0.tgz#47e9589c6d9c423470e312e00def06e249672571 "
245
+ integrity sha512-tEMhLeOM78FHC/rTltDd7pQN8WPAUZ1b0BPadYsKWqo/v6jWTbF6xeIMojdJa5yIW2vHjDU4LFJpkFFNacHpQw ==
246
246
dependencies :
247
247
delay "^5.0.0"
248
248
node-gyp-build "<4.0"
249
249
p-limit "^3.1.0"
250
- pprof-format "^2.1.0 "
250
+ pprof-format "^2.2.1 "
251
251
source-map "^0.7.4"
252
252
253
253
@@ -3793,10 +3793,10 @@ possible-typed-array-names@^1.0.0:
3793
3793
resolved "https://registry.yarnpkg.com/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz#93e3582bc0e5426586d9d07b79ee40fc841de4ae"
3794
3794
integrity sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg==
3795
3795
3796
- pprof-format@^2.1.0 :
3797
- version "2.1.0 "
3798
- resolved "https://registry.yarnpkg.com/pprof-format/-/pprof-format-2.1.0. tgz#acc8d7773bcf4faf0a3d3df11bceefba7ac06664 "
3799
- integrity sha512-0+G5bHH0RNr8E5hoZo/zJYsL92MhkZjwrHp3O2IxmY8RJL9ooKeuZ8Tm0ZNBw5sGZ9TiM71sthTjWoR2Vf5/xw ==
3796
+ pprof-format@^2.1.1, pprof-format@^2.2.1 :
3797
+ version "2.2.1 "
3798
+ resolved "https://registry.yarnpkg.com/pprof-format/-/pprof-format-2.2.1. tgz#64d32207fb46990349eb52825defb449d6ccc9b4 "
3799
+ integrity sha512-p4tVN7iK19ccDqQv8heyobzUmbHyds4N2FI6aBMcXz6y99MglTWDxIyhFkNaLeEXs6IFUEzT0zya0icbSLLY0g ==
3800
3800
3801
3801
prelude-ls@^1.2.1 :
3802
3802
version "1.2.1"
You can’t perform that action at this time.
0 commit comments