-
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
Skip telemetry heartbeat and add app closing event on shutdown flush #7496
base: master
Are you sure you want to change the base?
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 54 metrics, 9 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.45.0-SNAPSHOT~4e5feaf456, baseline=1.45.0-SNAPSHOT~0196f1eb01
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.095 s) : 0, 1095114
Total [baseline] (8.646 s) : 0, 8646342
Agent [candidate] (1.092 s) : 0, 1092407
Total [candidate] (8.611 s) : 0, 8610866
section iast
Agent [baseline] (1.22 s) : 0, 1219644
Total [baseline] (9.204 s) : 0, 9204050
Agent [candidate] (1.221 s) : 0, 1220888
Total [candidate] (9.208 s) : 0, 9207747
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.231 s) : 0, 1230636
Total [baseline] (9.171 s) : 0, 9171037
Agent [candidate] (1.223 s) : 0, 1222536
Total [candidate] (9.154 s) : 0, 9153553
section iast_TELEMETRY_OFF
Agent [baseline] (1.213 s) : 0, 1213133
Total [baseline] (9.148 s) : 0, 9147509
Agent [candidate] (1.214 s) : 0, 1214427
Total [candidate] (9.196 s) : 0, 9195845
gantt
title insecure-bank - break down per module: candidate=1.45.0-SNAPSHOT~4e5feaf456, baseline=1.45.0-SNAPSHOT~0196f1eb01
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (695.386 ms) : 0, 695386
BytebuddyAgent [candidate] (695.344 ms) : 0, 695344
GlobalTracer [baseline] (317.143 ms) : 0, 317143
GlobalTracer [candidate] (316.134 ms) : 0, 316134
AppSec [baseline] (54.441 ms) : 0, 54441
AppSec [candidate] (54.477 ms) : 0, 54477
Remote Config [baseline] (693.817 µs) : 0, 694
Remote Config [candidate] (674.169 µs) : 0, 674
Telemetry [baseline] (13.732 ms) : 0, 13732
Telemetry [candidate] (12.067 ms) : 0, 12067
section iast
BytebuddyAgent [baseline] (812.928 ms) : 0, 812928
BytebuddyAgent [candidate] (813.912 ms) : 0, 813912
GlobalTracer [baseline] (305.374 ms) : 0, 305374
GlobalTracer [candidate] (306.281 ms) : 0, 306281
AppSec [baseline] (57.386 ms) : 0, 57386
AppSec [candidate] (57.697 ms) : 0, 57697
Remote Config [baseline] (650.123 µs) : 0, 650
Remote Config [candidate] (632.143 µs) : 0, 632
Telemetry [baseline] (7.489 ms) : 0, 7489
Telemetry [candidate] (7.507 ms) : 0, 7507
IAST [baseline] (22.116 ms) : 0, 22116
IAST [candidate] (21.113 ms) : 0, 21113
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (820.758 ms) : 0, 820758
BytebuddyAgent [candidate] (814.757 ms) : 0, 814757
GlobalTracer [baseline] (307.582 ms) : 0, 307582
GlobalTracer [candidate] (306.357 ms) : 0, 306357
AppSec [baseline] (57.741 ms) : 0, 57741
AppSec [candidate] (56.628 ms) : 0, 56628
Remote Config [baseline] (626.206 µs) : 0, 626
Remote Config [candidate] (618.36 µs) : 0, 618
Telemetry [baseline] (7.584 ms) : 0, 7584
Telemetry [candidate] (7.489 ms) : 0, 7489
IAST [baseline] (22.377 ms) : 0, 22377
IAST [candidate] (22.874 ms) : 0, 22874
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (808.042 ms) : 0, 808042
BytebuddyAgent [candidate] (809.344 ms) : 0, 809344
GlobalTracer [baseline] (305.089 ms) : 0, 305089
GlobalTracer [candidate] (305.153 ms) : 0, 305153
AppSec [baseline] (57.687 ms) : 0, 57687
AppSec [candidate] (57.84 ms) : 0, 57840
Remote Config [baseline] (642.259 µs) : 0, 642
Remote Config [candidate] (611.178 µs) : 0, 611
Telemetry [baseline] (7.378 ms) : 0, 7378
Telemetry [candidate] (7.319 ms) : 0, 7319
IAST [baseline] (20.632 ms) : 0, 20632
IAST [candidate] (20.45 ms) : 0, 20450
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.45.0-SNAPSHOT~4e5feaf456, baseline=1.45.0-SNAPSHOT~0196f1eb01
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.099 s) : 0, 1098782
Total [baseline] (10.399 s) : 0, 10398754
Agent [candidate] (1.09 s) : 0, 1090129
Total [candidate] (10.429 s) : 0, 10428545
section appsec
Agent [baseline] (1.229 s) : 0, 1229225
Total [baseline] (10.662 s) : 0, 10661886
Agent [candidate] (1.229 s) : 0, 1229333
Total [candidate] (10.673 s) : 0, 10673341
section iast
Agent [baseline] (1.229 s) : 0, 1228808
Total [baseline] (10.984 s) : 0, 10983841
Agent [candidate] (1.238 s) : 0, 1237938
Total [candidate] (11.051 s) : 0, 11050503
section profiling
Agent [baseline] (1.317 s) : 0, 1316739
Total [baseline] (10.802 s) : 0, 10801997
Agent [candidate] (1.314 s) : 0, 1314079
Total [candidate] (10.775 s) : 0, 10775227
gantt
title petclinic - break down per module: candidate=1.45.0-SNAPSHOT~4e5feaf456, baseline=1.45.0-SNAPSHOT~0196f1eb01
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (700.502 ms) : 0, 700502
BytebuddyAgent [candidate] (693.531 ms) : 0, 693531
GlobalTracer [baseline] (318.843 ms) : 0, 318843
GlobalTracer [candidate] (316.057 ms) : 0, 316057
AppSec [baseline] (54.928 ms) : 0, 54928
AppSec [candidate] (54.829 ms) : 0, 54829
Remote Config [baseline] (678.303 µs) : 0, 678
Remote Config [candidate] (701.452 µs) : 0, 701
Telemetry [baseline] (10.034 ms) : 0, 10034
Telemetry [candidate] (11.311 ms) : 0, 11311
section appsec
BytebuddyAgent [baseline] (714.931 ms) : 0, 714931
BytebuddyAgent [candidate] (714.58 ms) : 0, 714580
GlobalTracer [baseline] (314.286 ms) : 0, 314286
GlobalTracer [candidate] (314.882 ms) : 0, 314882
AppSec [baseline] (166.59 ms) : 0, 166590
AppSec [candidate] (168.228 ms) : 0, 168228
IAST [baseline] (20.426 ms) : 0, 20426
IAST [candidate] (19.659 ms) : 0, 19659
Remote Config [baseline] (644.33 µs) : 0, 644
Remote Config [candidate] (633.742 µs) : 0, 634
Telemetry [baseline] (8.831 ms) : 0, 8831
Telemetry [candidate] (7.428 ms) : 0, 7428
section iast
BytebuddyAgent [baseline] (819.46 ms) : 0, 819460
BytebuddyAgent [candidate] (826.877 ms) : 0, 826877
GlobalTracer [baseline] (307.675 ms) : 0, 307675
GlobalTracer [candidate] (308.663 ms) : 0, 308663
AppSec [baseline] (58.273 ms) : 0, 58273
AppSec [candidate] (57.897 ms) : 0, 57897
IAST [baseline] (21.412 ms) : 0, 21412
IAST [candidate] (22.33 ms) : 0, 22330
Remote Config [baseline] (634.76 µs) : 0, 635
Remote Config [candidate] (630.549 µs) : 0, 631
Telemetry [baseline] (7.541 ms) : 0, 7541
Telemetry [candidate] (7.55 ms) : 0, 7550
section profiling
BytebuddyAgent [baseline] (689.549 ms) : 0, 689549
BytebuddyAgent [candidate] (688.41 ms) : 0, 688410
GlobalTracer [baseline] (432.249 ms) : 0, 432249
GlobalTracer [candidate] (430.824 ms) : 0, 430824
AppSec [baseline] (53.687 ms) : 0, 53687
AppSec [candidate] (53.839 ms) : 0, 53839
Remote Config [baseline] (670.943 µs) : 0, 671
Remote Config [candidate] (666.796 µs) : 0, 667
Telemetry [baseline] (7.64 ms) : 0, 7640
Telemetry [candidate] (7.584 ms) : 0, 7584
ProfilingAgent [baseline] (93.811 ms) : 0, 93811
ProfilingAgent [candidate] (93.65 ms) : 0, 93650
Profiling [baseline] (93.834 ms) : 0, 93834
Profiling [candidate] (93.674 ms) : 0, 93674
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 16 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~4e5feaf456, baseline=1.45.0-SNAPSHOT~0196f1eb01
dateFormat X
axisFormat %s
section baseline
no_agent (1.359 ms) : 1339, 1378
. : milestone, 1359,
appsec (1.754 ms) : 1731, 1778
. : milestone, 1754,
appsec_no_iast (1.771 ms) : 1747, 1795
. : milestone, 1771,
iast (1.492 ms) : 1469, 1514
. : milestone, 1492,
profiling (1.504 ms) : 1481, 1528
. : milestone, 1504,
tracing (1.508 ms) : 1484, 1532
. : milestone, 1508,
section candidate
no_agent (1.363 ms) : 1344, 1382
. : milestone, 1363,
appsec (1.771 ms) : 1747, 1795
. : milestone, 1771,
appsec_no_iast (1.758 ms) : 1732, 1783
. : milestone, 1758,
iast (1.485 ms) : 1462, 1507
. : milestone, 1485,
profiling (1.509 ms) : 1486, 1532
. : milestone, 1509,
tracing (1.496 ms) : 1472, 1520
. : milestone, 1496,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~4e5feaf456, baseline=1.45.0-SNAPSHOT~0196f1eb01
dateFormat X
axisFormat %s
section baseline
no_agent (373.559 µs) : 353, 394
. : milestone, 374,
iast (493.93 µs) : 473, 515
. : milestone, 494,
iast_FULL (656.413 µs) : 635, 678
. : milestone, 656,
iast_GLOBAL (518.841 µs) : 497, 541
. : milestone, 519,
iast_HARDCODED_SECRET_DISABLED (495.002 µs) : 474, 516
. : milestone, 495,
iast_INACTIVE (448.419 µs) : 428, 469
. : milestone, 448,
iast_TELEMETRY_OFF (481.665 µs) : 461, 503
. : milestone, 482,
tracing (443.46 µs) : 423, 464
. : milestone, 443,
section candidate
no_agent (375.728 µs) : 356, 395
. : milestone, 376,
iast (492.067 µs) : 471, 514
. : milestone, 492,
iast_FULL (655.376 µs) : 634, 677
. : milestone, 655,
iast_GLOBAL (529.26 µs) : 506, 552
. : milestone, 529,
iast_HARDCODED_SECRET_DISABLED (495.703 µs) : 474, 517
. : milestone, 496,
iast_INACTIVE (460.479 µs) : 439, 482
. : milestone, 460,
iast_TELEMETRY_OFF (481.65 µs) : 460, 503
. : milestone, 482,
tracing (445.579 µs) : 425, 466
. : milestone, 446,
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.45.0-SNAPSHOT~4e5feaf456, baseline=1.45.0-SNAPSHOT~0196f1eb01
dateFormat X
axisFormat %s
section baseline
no_agent (14.897 s) : 14897000, 14897000
. : milestone, 14897000,
appsec (15.043 s) : 15043000, 15043000
. : milestone, 15043000,
iast (18.647 s) : 18647000, 18647000
. : milestone, 18647000,
iast_GLOBAL (17.723 s) : 17723000, 17723000
. : milestone, 17723000,
profiling (15.302 s) : 15302000, 15302000
. : milestone, 15302000,
tracing (15.221 s) : 15221000, 15221000
. : milestone, 15221000,
section candidate
no_agent (15.405 s) : 15405000, 15405000
. : milestone, 15405000,
appsec (15.003 s) : 15003000, 15003000
. : milestone, 15003000,
iast (18.769 s) : 18769000, 18769000
. : milestone, 18769000,
iast_GLOBAL (17.922 s) : 17922000, 17922000
. : milestone, 17922000,
profiling (14.995 s) : 14995000, 14995000
. : milestone, 14995000,
tracing (14.958 s) : 14958000, 14958000
. : milestone, 14958000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~4e5feaf456, baseline=1.45.0-SNAPSHOT~0196f1eb01
dateFormat X
axisFormat %s
section baseline
no_agent (1.47 ms) : 1459, 1482
. : milestone, 1470,
appsec (2.35 ms) : 2308, 2392
. : milestone, 2350,
iast (2.093 ms) : 2040, 2146
. : milestone, 2093,
iast_GLOBAL (2.132 ms) : 2078, 2185
. : milestone, 2132,
profiling (1.964 ms) : 1921, 2007
. : milestone, 1964,
tracing (1.929 ms) : 1888, 1969
. : milestone, 1929,
section candidate
no_agent (1.469 ms) : 1457, 1480
. : milestone, 1469,
appsec (2.343 ms) : 2301, 2384
. : milestone, 2343,
iast (2.094 ms) : 2041, 2147
. : milestone, 2094,
iast_GLOBAL (2.135 ms) : 2082, 2188
. : milestone, 2135,
profiling (1.983 ms) : 1939, 2026
. : milestone, 1983,
tracing (1.933 ms) : 1893, 1974
. : milestone, 1933,
|
request.writeHeartbeat(); | ||
if (isClosing) { | ||
// Write early, if moved, ensure it does not get skipped because of size limits. | ||
request.writeAppClosing(); |
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 a side effect, this changes the request type for the app closing event, it won't be app-closing
anymore but a message-batch
.
Can this cause any issues further down the line in the backend (probably not)?
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.
Not really. The only problem is that we won't be optimizing the message size for the case where there is only an app-closing message. I think that will usually not be the case because of metrics, and anyway it's not that much overhead.
What Does This Do
Motivation
Review originally motivated by flaky system test that pointed that we sent heartbeats too fast. It turns out it was the heartbeat of the shutdown flush.
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 issue[ ] Update the public documentation in case of new configuration flag or behavior