-
Notifications
You must be signed in to change notification settings - Fork 312
Make rum injector stream/writer more resilient to errors #9184
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
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 45 metrics, 14 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.53.0-SNAPSHOT~21afeb2cac5, baseline=1.53.0-SNAPSHOT~9de0da8e64
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.048 s) : 0, 1048215
Total [baseline] (10.7 s) : 0, 10699822
Agent [candidate] (1.047 s) : 0, 1046833
Total [candidate] (10.721 s) : 0, 10720951
section appsec
Agent [baseline] (1.217 s) : 0, 1217002
Total [baseline] (10.867 s) : 0, 10866568
Agent [candidate] (1.231 s) : 0, 1230903
Total [candidate] (10.81 s) : 0, 10809546
section iast
Agent [baseline] (1.183 s) : 0, 1183343
Total [baseline] (10.947 s) : 0, 10947088
Agent [candidate] (1.176 s) : 0, 1175509
Total [candidate] (10.866 s) : 0, 10866138
section profiling
Agent [baseline] (1.191 s) : 0, 1191244
Total [baseline] (10.841 s) : 0, 10841036
Agent [candidate] (1.201 s) : 0, 1200556
Total [candidate] (10.968 s) : 0, 10968106
gantt
title petclinic - break down per module: candidate=1.53.0-SNAPSHOT~21afeb2cac5, baseline=1.53.0-SNAPSHOT~9de0da8e64
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.436 ms) : 0, 1436
crashtracking [candidate] (1.42 ms) : 0, 1420
BytebuddyAgent [baseline] (734.876 ms) : 0, 734876
BytebuddyAgent [candidate] (731.851 ms) : 0, 731851
GlobalTracer [baseline] (243.15 ms) : 0, 243150
GlobalTracer [candidate] (241.869 ms) : 0, 241869
AppSec [baseline] (30.092 ms) : 0, 30092
AppSec [candidate] (29.873 ms) : 0, 29873
Debugger [baseline] (6.052 ms) : 0, 6052
Debugger [candidate] (5.991 ms) : 0, 5991
Remote Config [baseline] (756.458 µs) : 0, 756
Remote Config [candidate] (647.308 µs) : 0, 647
Telemetry [baseline] (10.09 ms) : 0, 10090
Telemetry [candidate] (14.217 ms) : 0, 14217
section appsec
crashtracking [baseline] (1.424 ms) : 0, 1424
crashtracking [candidate] (1.438 ms) : 0, 1438
BytebuddyAgent [baseline] (751.015 ms) : 0, 751015
BytebuddyAgent [candidate] (760.287 ms) : 0, 760287
GlobalTracer [baseline] (234.793 ms) : 0, 234793
GlobalTracer [candidate] (237.101 ms) : 0, 237101
AppSec [baseline] (167.609 ms) : 0, 167609
AppSec [candidate] (168.988 ms) : 0, 168988
Debugger [baseline] (7.163 ms) : 0, 7163
Debugger [candidate] (8.772 ms) : 0, 8772
Remote Config [baseline] (610.48 µs) : 0, 610
Remote Config [candidate] (650.401 µs) : 0, 650
Telemetry [baseline] (9.81 ms) : 0, 9810
Telemetry [candidate] (8.403 ms) : 0, 8403
IAST [baseline] (23.523 ms) : 0, 23523
IAST [candidate] (24.051 ms) : 0, 24051
section iast
crashtracking [baseline] (1.44 ms) : 0, 1440
crashtracking [candidate] (1.425 ms) : 0, 1425
BytebuddyAgent [baseline] (855.201 ms) : 0, 855201
BytebuddyAgent [candidate] (848.363 ms) : 0, 848363
GlobalTracer [baseline] (232.941 ms) : 0, 232941
GlobalTracer [candidate] (232.088 ms) : 0, 232088
AppSec [baseline] (27.921 ms) : 0, 27921
AppSec [candidate] (28.706 ms) : 0, 28706
Debugger [baseline] (7.62 ms) : 0, 7620
Debugger [candidate] (6.647 ms) : 0, 6647
Remote Config [baseline] (600.696 µs) : 0, 601
Remote Config [candidate] (590.582 µs) : 0, 591
Telemetry [baseline] (8.329 ms) : 0, 8329
Telemetry [candidate] (8.284 ms) : 0, 8284
IAST [baseline] (28.188 ms) : 0, 28188
IAST [candidate] (28.336 ms) : 0, 28336
section profiling
ProfilingAgent [baseline] (108.427 ms) : 0, 108427
ProfilingAgent [candidate] (107.976 ms) : 0, 107976
crashtracking [baseline] (1.394 ms) : 0, 1394
crashtracking [candidate] (1.417 ms) : 0, 1417
BytebuddyAgent [baseline] (758.066 ms) : 0, 758066
BytebuddyAgent [candidate] (765.51 ms) : 0, 765510
GlobalTracer [baseline] (221.798 ms) : 0, 221798
GlobalTracer [candidate] (222.336 ms) : 0, 222336
AppSec [baseline] (30.033 ms) : 0, 30033
AppSec [candidate] (30.46 ms) : 0, 30460
Debugger [baseline] (6.35 ms) : 0, 6350
Debugger [candidate] (6.314 ms) : 0, 6314
Remote Config [baseline] (666.478 µs) : 0, 666
Remote Config [candidate] (679.543 µs) : 0, 680
Telemetry [baseline] (15.247 ms) : 0, 15247
Telemetry [candidate] (16.123 ms) : 0, 16123
Profiling [baseline] (109.069 ms) : 0, 109069
Profiling [candidate] (108.62 ms) : 0, 108620
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.53.0-SNAPSHOT~21afeb2cac5, baseline=1.53.0-SNAPSHOT~9de0da8e64
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.053 s) : 0, 1052858
Total [baseline] (8.578 s) : 0, 8577509
Agent [candidate] (1.051 s) : 0, 1051084
Total [candidate] (8.586 s) : 0, 8585778
section iast
Agent [baseline] (1.181 s) : 0, 1181416
Total [baseline] (9.327 s) : 0, 9327094
Agent [candidate] (1.179 s) : 0, 1179497
Total [candidate] (9.308 s) : 0, 9307725
gantt
title insecure-bank - break down per module: candidate=1.53.0-SNAPSHOT~21afeb2cac5, baseline=1.53.0-SNAPSHOT~9de0da8e64
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.447 ms) : 0, 1447
crashtracking [candidate] (1.438 ms) : 0, 1438
BytebuddyAgent [baseline] (736.737 ms) : 0, 736737
BytebuddyAgent [candidate] (735.58 ms) : 0, 735580
GlobalTracer [baseline] (243.668 ms) : 0, 243668
GlobalTracer [candidate] (243.868 ms) : 0, 243868
AppSec [baseline] (30.303 ms) : 0, 30303
AppSec [candidate] (30.25 ms) : 0, 30250
Debugger [baseline] (6.063 ms) : 0, 6063
Debugger [candidate] (6.06 ms) : 0, 6060
Remote Config [baseline] (662.547 µs) : 0, 663
Remote Config [candidate] (652.656 µs) : 0, 653
Telemetry [baseline] (12.919 ms) : 0, 12919
Telemetry [candidate] (11.448 ms) : 0, 11448
section iast
crashtracking [baseline] (1.44 ms) : 0, 1440
crashtracking [candidate] (1.443 ms) : 0, 1443
BytebuddyAgent [baseline] (853.57 ms) : 0, 853570
BytebuddyAgent [candidate] (852.573 ms) : 0, 852573
GlobalTracer [baseline] (233.039 ms) : 0, 233039
GlobalTracer [candidate] (233.271 ms) : 0, 233271
AppSec [baseline] (27.814 ms) : 0, 27814
AppSec [candidate] (26.247 ms) : 0, 26247
Debugger [baseline] (5.791 ms) : 0, 5791
Debugger [candidate] (5.825 ms) : 0, 5825
Remote Config [baseline] (599.07 µs) : 0, 599
Remote Config [candidate] (656.798 µs) : 0, 657
Telemetry [baseline] (8.239 ms) : 0, 8239
Telemetry [candidate] (8.24 ms) : 0, 8240
IAST [baseline] (29.946 ms) : 0, 29946
IAST [candidate] (30.3 ms) : 0, 30300
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 insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~21afeb2cac5, baseline=1.53.0-SNAPSHOT~9de0da8e64
dateFormat X
axisFormat %s
section baseline
no_agent (4.389 ms) : 4334, 4444
. : milestone, 4389,
iast (9.171 ms) : 9021, 9322
. : milestone, 9171,
iast_FULL (14.406 ms) : 14115, 14697
. : milestone, 14406,
iast_GLOBAL (10.634 ms) : 10445, 10824
. : milestone, 10634,
profiling (8.461 ms) : 8326, 8596
. : milestone, 8461,
tracing (7.325 ms) : 7216, 7435
. : milestone, 7325,
section candidate
no_agent (4.476 ms) : 4425, 4527
. : milestone, 4476,
iast (9.074 ms) : 8927, 9222
. : milestone, 9074,
iast_FULL (13.999 ms) : 13724, 14275
. : milestone, 13999,
iast_GLOBAL (10.426 ms) : 10246, 10605
. : milestone, 10426,
profiling (8.789 ms) : 8638, 8939
. : milestone, 8789,
tracing (7.651 ms) : 7537, 7765
. : milestone, 7651,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~21afeb2cac5, baseline=1.53.0-SNAPSHOT~9de0da8e64
dateFormat X
axisFormat %s
section baseline
no_agent (37.514 ms) : 37207, 37822
. : milestone, 37514,
appsec (46.404 ms) : 45998, 46811
. : milestone, 46404,
code_origins (44.328 ms) : 43949, 44706
. : milestone, 44328,
iast (45.103 ms) : 44710, 45496
. : milestone, 45103,
profiling (49.33 ms) : 48884, 49776
. : milestone, 49330,
tracing (44.197 ms) : 43827, 44566
. : milestone, 44197,
section candidate
no_agent (37.238 ms) : 36945, 37532
. : milestone, 37238,
appsec (47.121 ms) : 46710, 47531
. : milestone, 47121,
code_origins (43.937 ms) : 43555, 44318
. : milestone, 43937,
iast (44.846 ms) : 44457, 45235
. : milestone, 44846,
profiling (47.751 ms) : 47293, 48209
. : milestone, 47751,
tracing (44.103 ms) : 43730, 44476
. : milestone, 44103,
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 biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~21afeb2cac5, baseline=1.53.0-SNAPSHOT~9de0da8e64
dateFormat X
axisFormat %s
section baseline
no_agent (15.608 s) : 15608000, 15608000
. : milestone, 15608000,
appsec (14.76 s) : 14760000, 14760000
. : milestone, 14760000,
iast (18.598 s) : 18598000, 18598000
. : milestone, 18598000,
iast_GLOBAL (18.227 s) : 18227000, 18227000
. : milestone, 18227000,
profiling (15.375 s) : 15375000, 15375000
. : milestone, 15375000,
tracing (14.987 s) : 14987000, 14987000
. : milestone, 14987000,
section candidate
no_agent (14.934 s) : 14934000, 14934000
. : milestone, 14934000,
appsec (14.875 s) : 14875000, 14875000
. : milestone, 14875000,
iast (18.707 s) : 18707000, 18707000
. : milestone, 18707000,
iast_GLOBAL (18.012 s) : 18012000, 18012000
. : milestone, 18012000,
profiling (15.303 s) : 15303000, 15303000
. : milestone, 15303000,
tracing (15.039 s) : 15039000, 15039000
. : milestone, 15039000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~21afeb2cac5, baseline=1.53.0-SNAPSHOT~9de0da8e64
dateFormat X
axisFormat %s
section baseline
no_agent (1.473 ms) : 1461, 1484
. : milestone, 1473,
appsec (3.652 ms) : 3435, 3869
. : milestone, 3652,
iast (2.197 ms) : 2134, 2259
. : milestone, 2197,
iast_GLOBAL (2.234 ms) : 2172, 2297
. : milestone, 2234,
profiling (2.022 ms) : 1972, 2072
. : milestone, 2022,
tracing (2.012 ms) : 1963, 2060
. : milestone, 2012,
section candidate
no_agent (1.471 ms) : 1460, 1483
. : milestone, 1471,
appsec (3.647 ms) : 3431, 3862
. : milestone, 3647,
iast (2.18 ms) : 2118, 2242
. : milestone, 2180,
iast_GLOBAL (2.226 ms) : 2164, 2288
. : milestone, 2226,
profiling (2.055 ms) : 2003, 2106
. : milestone, 2055,
tracing (2.004 ms) : 1955, 2052
. : milestone, 2004,
|
b1720e0
to
7e5f82a
Compare
.../src/main/java/datadog/trace/bootstrap/instrumentation/buffer/InjectingPipeOutputStream.java
Outdated
Show resolved
Hide resolved
…strap/instrumentation/buffer/InjectingPipeOutputStream.java Co-authored-by: Stuart McCulloch <[email protected]>
1776d17
to
21afeb2
Compare
Code coverage: total 58.97%, base diff 1.70%, patch 89.06% (view details) This comment will be updated automatically if new data arrives.🔗 Commit SHA: 21afeb2 | Docs | Was this helpful? Give us feedback! |
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.
Looking good. Looks like all comments and suggestions were taken care of too.
What Does This Do
Make
InjectingPipeOutStream
andInjectingPipeWriter
more deterministic when anIOException
is thrown by the downstream.In this particular case, the wrappers stop trying to inject to the downstream and just delegate the writes since the underlying buffer is now in an inconsistent state (we do not know in advance which portion of the buffer has been eventually written and what will be the retry policy of the user). This implies that eventually data can be corrupted or lost (but this would also have happened without this wrapper)
However, if the error arose when draining, the draining is resumed from the position that broke.
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]