-
Notifications
You must be signed in to change notification settings - Fork 292
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
Spring scheduling: ensure spans have no parent #7583
Conversation
...ain/java/datadog/trace/instrumentation/springscheduling/SpringSchedulingRunnableWrapper.java
Outdated
Show resolved
Hide resolved
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.
+1 can we add a test to confirm the new behaviour?
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 51 metrics, 12 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.40.0-SNAPSHOT~2a32bc0279, baseline=1.40.0-SNAPSHOT~1d59e612a6
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.051 s) : 0, 1051321
Total [baseline] (8.493 s) : 0, 8492707
Agent [candidate] (1.052 s) : 0, 1051912
Total [candidate] (8.503 s) : 0, 8503078
section iast
Agent [baseline] (1.175 s) : 0, 1175076
Total [baseline] (8.987 s) : 0, 8987353
Agent [candidate] (1.175 s) : 0, 1174554
Total [candidate] (8.948 s) : 0, 8947689
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.175 s) : 0, 1175172
Total [baseline] (8.947 s) : 0, 8946550
Agent [candidate] (1.184 s) : 0, 1183903
Total [candidate] (8.98 s) : 0, 8980345
section iast_TELEMETRY_OFF
Agent [baseline] (1.171 s) : 0, 1171100
Total [baseline] (8.95 s) : 0, 8950306
Agent [candidate] (1.177 s) : 0, 1177158
Total [candidate] (8.992 s) : 0, 8991707
gantt
title insecure-bank - break down per module: candidate=1.40.0-SNAPSHOT~2a32bc0279, baseline=1.40.0-SNAPSHOT~1d59e612a6
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (670.635 ms) : 0, 670635
BytebuddyAgent [candidate] (670.968 ms) : 0, 670968
GlobalTracer [baseline] (307.572 ms) : 0, 307572
GlobalTracer [candidate] (307.743 ms) : 0, 307743
AppSec [baseline] (51.358 ms) : 0, 51358
AppSec [candidate] (51.362 ms) : 0, 51362
Remote Config [baseline] (687.511 µs) : 0, 688
Remote Config [candidate] (690.432 µs) : 0, 690
Telemetry [baseline] (7.506 ms) : 0, 7506
Telemetry [candidate] (7.526 ms) : 0, 7526
section iast
BytebuddyAgent [baseline] (781.701 ms) : 0, 781701
BytebuddyAgent [candidate] (781.054 ms) : 0, 781054
GlobalTracer [baseline] (295.984 ms) : 0, 295984
GlobalTracer [candidate] (296.211 ms) : 0, 296211
AppSec [baseline] (54.877 ms) : 0, 54877
AppSec [candidate] (51.512 ms) : 0, 51512
IAST [baseline] (20.974 ms) : 0, 20974
IAST [candidate] (24.358 ms) : 0, 24358
Remote Config [baseline] (597.819 µs) : 0, 598
Remote Config [candidate] (580.72 µs) : 0, 581
Telemetry [baseline] (7.323 ms) : 0, 7323
Telemetry [candidate] (7.197 ms) : 0, 7197
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (781.435 ms) : 0, 781435
BytebuddyAgent [candidate] (787.027 ms) : 0, 787027
GlobalTracer [baseline] (296.058 ms) : 0, 296058
GlobalTracer [candidate] (298.255 ms) : 0, 298255
AppSec [baseline] (54.265 ms) : 0, 54265
AppSec [candidate] (52.302 ms) : 0, 52302
IAST [baseline] (21.006 ms) : 0, 21006
IAST [candidate] (24.557 ms) : 0, 24557
Remote Config [baseline] (587.649 µs) : 0, 588
Remote Config [candidate] (606.675 µs) : 0, 607
Telemetry [baseline] (8.205 ms) : 0, 8205
Telemetry [candidate] (7.436 ms) : 0, 7436
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (778.176 ms) : 0, 778176
BytebuddyAgent [candidate] (783.72 ms) : 0, 783720
GlobalTracer [baseline] (295.476 ms) : 0, 295476
GlobalTracer [candidate] (295.765 ms) : 0, 295765
AppSec [baseline] (52.837 ms) : 0, 52837
AppSec [candidate] (55.034 ms) : 0, 55034
IAST [baseline] (22.393 ms) : 0, 22393
IAST [candidate] (20.99 ms) : 0, 20990
Remote Config [baseline] (592.727 µs) : 0, 593
Remote Config [candidate] (587.467 µs) : 0, 587
Telemetry [baseline] (8.003 ms) : 0, 8003
Telemetry [candidate] (7.324 ms) : 0, 7324
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.40.0-SNAPSHOT~2a32bc0279, baseline=1.40.0-SNAPSHOT~1d59e612a6
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.066 s) : 0, 1066224
Total [baseline] (10.479 s) : 0, 10478798
Agent [candidate] (1.05 s) : 0, 1050346
Total [candidate] (10.335 s) : 0, 10335154
section appsec
Agent [baseline] (1.188 s) : 0, 1188251
Total [baseline] (10.55 s) : 0, 10550499
Agent [candidate] (1.183 s) : 0, 1183211
Total [candidate] (10.562 s) : 0, 10561683
section iast
Agent [baseline] (1.177 s) : 0, 1177186
Total [baseline] (10.793 s) : 0, 10792562
Agent [candidate] (1.176 s) : 0, 1175828
Total [candidate] (10.787 s) : 0, 10787004
section profiling
Agent [baseline] (1.254 s) : 0, 1254443
Total [baseline] (10.547 s) : 0, 10547164
Agent [candidate] (1.247 s) : 0, 1247023
Total [candidate] (10.591 s) : 0, 10590594
gantt
title petclinic - break down per module: candidate=1.40.0-SNAPSHOT~2a32bc0279, baseline=1.40.0-SNAPSHOT~1d59e612a6
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (680.786 ms) : 0, 680786
BytebuddyAgent [candidate] (669.903 ms) : 0, 669903
GlobalTracer [baseline] (311.442 ms) : 0, 311442
GlobalTracer [candidate] (307.533 ms) : 0, 307533
AppSec [baseline] (51.947 ms) : 0, 51947
AppSec [candidate] (51.211 ms) : 0, 51211
Remote Config [baseline] (685.596 µs) : 0, 686
Remote Config [candidate] (682.551 µs) : 0, 683
Telemetry [baseline] (7.609 ms) : 0, 7609
Telemetry [candidate] (7.41 ms) : 0, 7410
section appsec
BytebuddyAgent [baseline] (693.188 ms) : 0, 693188
BytebuddyAgent [candidate] (691.33 ms) : 0, 691330
GlobalTracer [baseline] (301.811 ms) : 0, 301811
GlobalTracer [candidate] (300.842 ms) : 0, 300842
AppSec [baseline] (160.709 ms) : 0, 160709
AppSec [candidate] (158.923 ms) : 0, 158923
Remote Config [baseline] (626.311 µs) : 0, 626
Remote Config [candidate] (629.182 µs) : 0, 629
Telemetry [baseline] (8.142 ms) : 0, 8142
Telemetry [candidate] (8.279 ms) : 0, 8279
IAST [baseline] (20.294 ms) : 0, 20294
IAST [candidate] (19.175 ms) : 0, 19175
section iast
BytebuddyAgent [baseline] (783.504 ms) : 0, 783504
BytebuddyAgent [candidate] (781.817 ms) : 0, 781817
GlobalTracer [baseline] (296.251 ms) : 0, 296251
GlobalTracer [candidate] (296.285 ms) : 0, 296285
AppSec [baseline] (53.463 ms) : 0, 53463
AppSec [candidate] (51.074 ms) : 0, 51074
Remote Config [baseline] (584.467 µs) : 0, 584
Remote Config [candidate] (591.586 µs) : 0, 592
Telemetry [baseline] (7.257 ms) : 0, 7257
Telemetry [candidate] (7.269 ms) : 0, 7269
IAST [baseline] (22.521 ms) : 0, 22521
IAST [candidate] (25.143 ms) : 0, 25143
section profiling
BytebuddyAgent [baseline] (670.12 ms) : 0, 670120
BytebuddyAgent [candidate] (664.533 ms) : 0, 664533
GlobalTracer [baseline] (390.517 ms) : 0, 390517
GlobalTracer [candidate] (388.662 ms) : 0, 388662
AppSec [baseline] (52.366 ms) : 0, 52366
AppSec [candidate] (52.008 ms) : 0, 52008
Remote Config [baseline] (683.083 µs) : 0, 683
Remote Config [candidate] (681.63 µs) : 0, 682
Telemetry [baseline] (7.398 ms) : 0, 7398
Telemetry [candidate] (7.398 ms) : 0, 7398
ProfilingAgent [baseline] (95.306 ms) : 0, 95306
ProfilingAgent [candidate] (95.905 ms) : 0, 95905
Profiling [baseline] (95.33 ms) : 0, 95330
Profiling [candidate] (95.928 ms) : 0, 95928
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 17 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.40.0-SNAPSHOT~2a32bc0279, baseline=1.40.0-SNAPSHOT~1d59e612a6
dateFormat X
axisFormat %s
section baseline
no_agent (369.397 µs) : 349, 390
. : milestone, 369,
iast (472.487 µs) : 451, 494
. : milestone, 472,
iast_FULL (553.096 µs) : 532, 574
. : milestone, 553,
iast_GLOBAL (500.015 µs) : 479, 521
. : milestone, 500,
iast_HARDCODED_SECRET_DISABLED (487.809 µs) : 466, 509
. : milestone, 488,
iast_INACTIVE (443.957 µs) : 423, 465
. : milestone, 444,
iast_TELEMETRY_OFF (474.98 µs) : 452, 498
. : milestone, 475,
tracing (441.545 µs) : 421, 462
. : milestone, 442,
section candidate
no_agent (368.907 µs) : 349, 389
. : milestone, 369,
iast (483.694 µs) : 463, 505
. : milestone, 484,
iast_FULL (551.581 µs) : 531, 573
. : milestone, 552,
iast_GLOBAL (515.91 µs) : 493, 539
. : milestone, 516,
iast_HARDCODED_SECRET_DISABLED (488.596 µs) : 466, 511
. : milestone, 489,
iast_INACTIVE (443.653 µs) : 423, 465
. : milestone, 444,
iast_TELEMETRY_OFF (471.328 µs) : 448, 494
. : milestone, 471,
tracing (437.348 µs) : 417, 457
. : milestone, 437,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.40.0-SNAPSHOT~2a32bc0279, baseline=1.40.0-SNAPSHOT~1d59e612a6
dateFormat X
axisFormat %s
section baseline
no_agent (1.351 ms) : 1332, 1370
. : milestone, 1351,
appsec (1.736 ms) : 1711, 1761
. : milestone, 1736,
appsec_no_iast (1.728 ms) : 1703, 1753
. : milestone, 1728,
iast (1.481 ms) : 1458, 1503
. : milestone, 1481,
profiling (1.469 ms) : 1446, 1492
. : milestone, 1469,
tracing (1.492 ms) : 1468, 1515
. : milestone, 1492,
section candidate
no_agent (1.338 ms) : 1318, 1359
. : milestone, 1338,
appsec (1.714 ms) : 1691, 1737
. : milestone, 1714,
appsec_no_iast (1.753 ms) : 1729, 1777
. : milestone, 1753,
iast (1.458 ms) : 1436, 1481
. : milestone, 1458,
profiling (1.507 ms) : 1483, 1532
. : milestone, 1507,
tracing (1.469 ms) : 1445, 1494
. : milestone, 1469,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.40.0-SNAPSHOT~2a32bc0279, baseline=1.40.0-SNAPSHOT~1d59e612a6
dateFormat X
axisFormat %s
section baseline
no_agent (15.553 s) : 15553000, 15553000
. : milestone, 15553000,
appsec (15.086 s) : 15086000, 15086000
. : milestone, 15086000,
iast (18.852 s) : 18852000, 18852000
. : milestone, 18852000,
iast_GLOBAL (17.897 s) : 17897000, 17897000
. : milestone, 17897000,
profiling (15.138 s) : 15138000, 15138000
. : milestone, 15138000,
tracing (15.037 s) : 15037000, 15037000
. : milestone, 15037000,
section candidate
no_agent (15.366 s) : 15366000, 15366000
. : milestone, 15366000,
appsec (15.218 s) : 15218000, 15218000
. : milestone, 15218000,
iast (18.793 s) : 18793000, 18793000
. : milestone, 18793000,
iast_GLOBAL (17.817 s) : 17817000, 17817000
. : milestone, 17817000,
profiling (15.27 s) : 15270000, 15270000
. : milestone, 15270000,
tracing (15.117 s) : 15117000, 15117000
. : milestone, 15117000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.40.0-SNAPSHOT~2a32bc0279, baseline=1.40.0-SNAPSHOT~1d59e612a6
dateFormat X
axisFormat %s
section baseline
no_agent (1.46 ms) : 1448, 1471
. : milestone, 1460,
appsec (2.25 ms) : 2214, 2286
. : milestone, 2250,
iast (1.995 ms) : 1950, 2040
. : milestone, 1995,
iast_GLOBAL (2.037 ms) : 1992, 2081
. : milestone, 2037,
profiling (1.864 ms) : 1829, 1898
. : milestone, 1864,
tracing (1.839 ms) : 1806, 1872
. : milestone, 1839,
section candidate
no_agent (1.467 ms) : 1455, 1479
. : milestone, 1467,
appsec (2.252 ms) : 2216, 2287
. : milestone, 2252,
iast (2.001 ms) : 1957, 2046
. : milestone, 2001,
iast_GLOBAL (2.027 ms) : 1984, 2071
. : milestone, 2027,
profiling (1.876 ms) : 1842, 1911
. : milestone, 1876,
tracing (1.849 ms) : 1816, 1882
. : milestone, 1849,
|
What Does This Do
According to our tests the spring scheduling spans should have no parent. This PR ensure that the spans are created with a noop parent scope. Temporary, I also added a way to restore the old behaviour (that's nondeterministic anyway) by
-Ddd.spring-scheduling.legacy.tracing.enabled=true
DD_SPRING_SCHEDULING_LEGACY_TRACING_ENABLED=true
Motivation
Additional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]