-
Notifications
You must be signed in to change notification settings - Fork 318
Make test span serialization idempotent #9456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
🎯 Code Coverage 🔗 Commit SHA: ba3963c | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 53 metrics, 12 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.53.0-SNAPSHOT~ba3963c2e1, baseline=1.55.0-SNAPSHOT~2413c501d7
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.036 s) : 0, 1036267
Total [baseline] (8.65 s) : 0, 8649663
Agent [candidate] (1.032 s) : 0, 1032037
Total [candidate] (8.669 s) : 0, 8669173
section iast
Agent [baseline] (1.17 s) : 0, 1169836
Total [baseline] (9.43 s) : 0, 9429656
Agent [candidate] (1.162 s) : 0, 1161835
Total [candidate] (9.336 s) : 0, 9336116
gantt
title insecure-bank - break down per module: candidate=1.53.0-SNAPSHOT~ba3963c2e1, baseline=1.55.0-SNAPSHOT~2413c501d7
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.478 ms) : 0, 1478
crashtracking [candidate] (1.476 ms) : 0, 1476
BytebuddyAgent [baseline] (706.45 ms) : 0, 706450
BytebuddyAgent [candidate] (704.077 ms) : 0, 704077
GlobalTracer [baseline] (246.063 ms) : 0, 246063
GlobalTracer [candidate] (245.11 ms) : 0, 245110
AppSec [baseline] (32.619 ms) : 0, 32619
AppSec [candidate] (32.47 ms) : 0, 32470
Debugger [baseline] (6.466 ms) : 0, 6466
Debugger [candidate] (6.392 ms) : 0, 6392
Remote Config [baseline] (687.883 µs) : 0, 688
Remote Config [candidate] (673.637 µs) : 0, 674
Telemetry [baseline] (12.433 ms) : 0, 12433
Telemetry [candidate] (15.737 ms) : 0, 15737
Flare Poller [baseline] (8.856 ms) : 0, 8856
Flare Poller [candidate] (5.044 ms) : 0, 5044
section iast
crashtracking [baseline] (1.484 ms) : 0, 1484
crashtracking [candidate] (1.469 ms) : 0, 1469
BytebuddyAgent [baseline] (830.458 ms) : 0, 830458
BytebuddyAgent [candidate] (824.391 ms) : 0, 824391
GlobalTracer [baseline] (235.147 ms) : 0, 235147
GlobalTracer [candidate] (233.663 ms) : 0, 233663
AppSec [baseline] (28.348 ms) : 0, 28348
AppSec [candidate] (30.896 ms) : 0, 30896
Debugger [baseline] (6.147 ms) : 0, 6147
Debugger [candidate] (6.099 ms) : 0, 6099
Remote Config [baseline] (627.448 µs) : 0, 627
Remote Config [candidate] (601.809 µs) : 0, 602
Telemetry [baseline] (8.45 ms) : 0, 8450
Telemetry [candidate] (8.53 ms) : 0, 8530
Flare Poller [baseline] (4.147 ms) : 0, 4147
Flare Poller [candidate] (4.188 ms) : 0, 4188
IAST [baseline] (33.545 ms) : 0, 33545
IAST [candidate] (30.729 ms) : 0, 30729
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.53.0-SNAPSHOT~ba3963c2e1, baseline=1.55.0-SNAPSHOT~2413c501d7
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.033 s) : 0, 1032649
Total [baseline] (10.768 s) : 0, 10768430
Agent [candidate] (1.032 s) : 0, 1031752
Total [candidate] (10.84 s) : 0, 10840201
section appsec
Agent [baseline] (1.204 s) : 0, 1203574
Total [baseline] (10.943 s) : 0, 10943437
Agent [candidate] (1.205 s) : 0, 1204880
Total [candidate] (11.011 s) : 0, 11010796
section iast
Agent [baseline] (1.167 s) : 0, 1166546
Total [baseline] (11.089 s) : 0, 11088751
Agent [candidate] (1.173 s) : 0, 1172624
Total [candidate] (11.095 s) : 0, 11095296
section profiling
Agent [baseline] (1.172 s) : 0, 1172226
Total [baseline] (10.885 s) : 0, 10884784
Agent [candidate] (1.18 s) : 0, 1180436
Total [candidate] (11.05 s) : 0, 11049693
gantt
title petclinic - break down per module: candidate=1.53.0-SNAPSHOT~ba3963c2e1, baseline=1.55.0-SNAPSHOT~2413c501d7
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.467 ms) : 0, 1467
crashtracking [candidate] (1.47 ms) : 0, 1470
BytebuddyAgent [baseline] (704.181 ms) : 0, 704181
BytebuddyAgent [candidate] (703.504 ms) : 0, 703504
GlobalTracer [baseline] (245.276 ms) : 0, 245276
GlobalTracer [candidate] (245.175 ms) : 0, 245175
AppSec [baseline] (32.386 ms) : 0, 32386
AppSec [candidate] (32.418 ms) : 0, 32418
Debugger [baseline] (6.406 ms) : 0, 6406
Debugger [candidate] (6.389 ms) : 0, 6389
Remote Config [baseline] (678.155 µs) : 0, 678
Remote Config [candidate] (677.46 µs) : 0, 677
Telemetry [baseline] (15.938 ms) : 0, 15938
Telemetry [candidate] (15.943 ms) : 0, 15943
Flare Poller [baseline] (5.074 ms) : 0, 5074
Flare Poller [candidate] (4.968 ms) : 0, 4968
section appsec
crashtracking [baseline] (1.461 ms) : 0, 1461
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (726.922 ms) : 0, 726922
BytebuddyAgent [candidate] (727.254 ms) : 0, 727254
GlobalTracer [baseline] (236.256 ms) : 0, 236256
GlobalTracer [candidate] (236.269 ms) : 0, 236269
AppSec [baseline] (174.033 ms) : 0, 174033
AppSec [candidate] (174.636 ms) : 0, 174636
Debugger [baseline] (5.887 ms) : 0, 5887
Debugger [candidate] (5.94 ms) : 0, 5940
Remote Config [baseline] (623.373 µs) : 0, 623
Remote Config [candidate] (628.512 µs) : 0, 629
Telemetry [baseline] (8.376 ms) : 0, 8376
Telemetry [candidate] (8.483 ms) : 0, 8483
Flare Poller [baseline] (3.889 ms) : 0, 3889
Flare Poller [candidate] (3.923 ms) : 0, 3923
IAST [baseline] (24.995 ms) : 0, 24995
IAST [candidate] (25.154 ms) : 0, 25154
section iast
crashtracking [baseline] (1.467 ms) : 0, 1467
crashtracking [candidate] (1.476 ms) : 0, 1476
BytebuddyAgent [baseline] (827.912 ms) : 0, 827912
BytebuddyAgent [candidate] (833.012 ms) : 0, 833012
GlobalTracer [baseline] (234.763 ms) : 0, 234763
GlobalTracer [candidate] (235.524 ms) : 0, 235524
AppSec [baseline] (28.954 ms) : 0, 28954
AppSec [candidate] (29.046 ms) : 0, 29046
Debugger [baseline] (6.173 ms) : 0, 6173
Debugger [candidate] (6.187 ms) : 0, 6187
Remote Config [baseline] (601.317 µs) : 0, 601
Remote Config [candidate] (588.87 µs) : 0, 589
Telemetry [baseline] (8.435 ms) : 0, 8435
Telemetry [candidate] (8.502 ms) : 0, 8502
Flare Poller [baseline] (4.119 ms) : 0, 4119
Flare Poller [candidate] (4.108 ms) : 0, 4108
IAST [baseline] (32.709 ms) : 0, 32709
IAST [candidate] (32.693 ms) : 0, 32693
section profiling
ProfilingAgent [baseline] (109.298 ms) : 0, 109298
ProfilingAgent [candidate] (110.809 ms) : 0, 110809
crashtracking [baseline] (1.461 ms) : 0, 1461
crashtracking [candidate] (1.466 ms) : 0, 1466
BytebuddyAgent [baseline] (726.058 ms) : 0, 726058
BytebuddyAgent [candidate] (731.003 ms) : 0, 731003
GlobalTracer [baseline] (219.833 ms) : 0, 219833
GlobalTracer [candidate] (221.214 ms) : 0, 221214
AppSec [baseline] (32.379 ms) : 0, 32379
AppSec [candidate] (32.463 ms) : 0, 32463
Debugger [baseline] (12.281 ms) : 0, 12281
Debugger [candidate] (13.105 ms) : 0, 13105
Remote Config [baseline] (719.66 µs) : 0, 720
Remote Config [candidate] (1.491 ms) : 0, 1491
Telemetry [baseline] (10.705 ms) : 0, 10705
Telemetry [candidate] (9.07 ms) : 0, 9070
Flare Poller [baseline] (4.091 ms) : 0, 4091
Flare Poller [candidate] (4.111 ms) : 0, 4111
Profiling [baseline] (109.939 ms) : 0, 109939
Profiling [candidate] (111.468 ms) : 0, 111468
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 2 performance regressions! Performance is the same for 9 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~ba3963c2e1, baseline=1.55.0-SNAPSHOT~2413c501d7
dateFormat X
axisFormat %s
section baseline
no_agent (18.862 ms) : 18667, 19056
. : milestone, 18862,
appsec (19.467 ms) : 19266, 19669
. : milestone, 19467,
code_origins (19.508 ms) : 19309, 19706
. : milestone, 19508,
iast (19.488 ms) : 19292, 19684
. : milestone, 19488,
profiling (19.107 ms) : 18912, 19302
. : milestone, 19107,
tracing (18.186 ms) : 18004, 18368
. : milestone, 18186,
section candidate
no_agent (18.904 ms) : 18712, 19095
. : milestone, 18904,
appsec (20.33 ms) : 20124, 20537
. : milestone, 20330,
code_origins (19.25 ms) : 19060, 19441
. : milestone, 19250,
iast (19.824 ms) : 19623, 20026
. : milestone, 19824,
profiling (19.271 ms) : 19078, 19464
. : milestone, 19271,
tracing (19.46 ms) : 19265, 19655
. : milestone, 19460,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~ba3963c2e1, baseline=1.55.0-SNAPSHOT~2413c501d7
dateFormat X
axisFormat %s
section baseline
no_agent (1.198 ms) : 1186, 1210
. : milestone, 1198,
iast (3.234 ms) : 3193, 3275
. : milestone, 3234,
iast_FULL (5.765 ms) : 5707, 5822
. : milestone, 5765,
iast_GLOBAL (3.524 ms) : 3466, 3582
. : milestone, 3524,
profiling (1.943 ms) : 1927, 1959
. : milestone, 1943,
tracing (1.81 ms) : 1795, 1825
. : milestone, 1810,
section candidate
no_agent (1.193 ms) : 1181, 1204
. : milestone, 1193,
iast (3.236 ms) : 3191, 3280
. : milestone, 3236,
iast_FULL (5.563 ms) : 5508, 5617
. : milestone, 5563,
iast_GLOBAL (3.553 ms) : 3501, 3606
. : milestone, 3553,
profiling (1.898 ms) : 1882, 1913
. : milestone, 1898,
tracing (1.854 ms) : 1838, 1871
. : milestone, 1854,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~ba3963c2e1, baseline=1.55.0-SNAPSHOT~2413c501d7
dateFormat X
axisFormat %s
section baseline
no_agent (1.469 ms) : 1458, 1481
. : milestone, 1469,
appsec (2.449 ms) : 2398, 2500
. : milestone, 2449,
iast (2.199 ms) : 2135, 2262
. : milestone, 2199,
iast_GLOBAL (2.233 ms) : 2169, 2296
. : milestone, 2233,
profiling (2.045 ms) : 1994, 2097
. : milestone, 2045,
tracing (2.027 ms) : 1978, 2077
. : milestone, 2027,
section candidate
no_agent (1.469 ms) : 1458, 1481
. : milestone, 1469,
appsec (3.652 ms) : 3437, 3867
. : milestone, 3652,
iast (2.205 ms) : 2142, 2269
. : milestone, 2205,
iast_GLOBAL (2.255 ms) : 2191, 2320
. : milestone, 2255,
profiling (2.055 ms) : 2002, 2107
. : milestone, 2055,
tracing (2.022 ms) : 1972, 2071
. : milestone, 2022,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~ba3963c2e1, baseline=1.55.0-SNAPSHOT~2413c501d7
dateFormat X
axisFormat %s
section baseline
no_agent (14.944 s) : 14944000, 14944000
. : milestone, 14944000,
appsec (15.024 s) : 15024000, 15024000
. : milestone, 15024000,
iast (18.247 s) : 18247000, 18247000
. : milestone, 18247000,
iast_GLOBAL (17.986 s) : 17986000, 17986000
. : milestone, 17986000,
profiling (15.3 s) : 15300000, 15300000
. : milestone, 15300000,
tracing (15.351 s) : 15351000, 15351000
. : milestone, 15351000,
section candidate
no_agent (15.553 s) : 15553000, 15553000
. : milestone, 15553000,
appsec (14.761 s) : 14761000, 14761000
. : milestone, 14761000,
iast (18.523 s) : 18523000, 18523000
. : milestone, 18523000,
iast_GLOBAL (18.129 s) : 18129000, 18129000
. : milestone, 18129000,
profiling (15.275 s) : 15275000, 15275000
. : milestone, 15275000,
tracing (15.328 s) : 15328000, 15328000
. : milestone, 15328000,
|
|
|
||
| @Override | ||
| public void accept(Metadata metadata) { | ||
| TagMap tags = metadata.getTags().copy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we try and estimate the overhead of this (with a test-environment run, for example)? Creating a copy of the tags map for every serialized span could be a big deal. I know there's an implementation of TagMap that is optimized for copying, but it isn't used by default still.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it will be less overhead to skip the DEFAULT_TOP_LEVEL_TAGS when iterating over the tag entries below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline, I'll test the two implementations on test environment to see how it impacts performance 👍
Test Environment - sbt-scalatestJob Status: success
|
Test Environment - nebula-release-pluginJob Status: success
|
Test Environment - pass4sJob Status: success
|
Test Environment - netflix-zuulJob Status: success
|
Test Environment - reactive-streams-jvmJob Status: success
|
Test Environment - sonar-kotlinJob Status: success
|
Test Environment - sonar-javaJob Status: success
|
Test Environment - jolokiaJob Status: success
|
Test Environment - okhttpJob Status: success
|
Test Environment - spring_bootJob Status: success
|
|
@nikita-tkachenko-datadog coming back to this fix, now that the test environment is in a more stable state, the performance comparison between this approach and #9462 is the following:
The green markers indicate the lower overhead implementation, with the yellow markers indicating that the overhead still surpassed the p95 average. The results per implementation are for individual runs. |
What Does This Do
datadog.trace.civisibility.writer.ddintake.CiTestCycleMapperV1#mapidempotent by not removing the top level tagstest_session_id,test_module_id,test_suite_idanditr_correlation_idfrom the test span on mapping.Motivation
datadog.communication.serialization.msgpack.MsgPackWriter#format, the mapping will be attempted again after flushing the buffer. Given that the test span was being modified inside the method, it meant that successive calls on the same span would yield different results. This materialized as test spans being sent to the backend without the ID tags.Contributor Checklist
type:and (comp:orinst:) labels in addition to any usefull labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: SDTEST-2590