Skip to content

Add mechanism to remove exception probes - #8163

Closed
jpbempel wants to merge 1 commit into
masterfrom
jpbempel/failsafe-exception-replay-hot-path
Closed

Add mechanism to remove exception probes#8163
jpbempel wants to merge 1 commit into
masterfrom
jpbempel/failsafe-exception-replay-hot-path

Conversation

@jpbempel

@jpbempeljpbempel commented Jan 7, 2025

Copy link
Copy Markdown
Member

What Does This Do

Add circuit breaker when evaluating exception probe to detect when an exception probe is executed in a hot path only waiting for exception to happen.
when circuit breaker is open after 1000 calls in 10 seconds window, we check if there is no exception captured during this period too and remove the probe from the configuration and un-instrument it. This will prevent too much overhead for hot path

Motivation

Additional Notes

Contributor Checklist

Jira ticket: DEBUG-3308

Add circuit breaker when evaluating exception probe to detect when
an exception probe is executed in a hot path only waiting for
exception to happen.
when circuit breaker is open after 1000 calls in 10 seconds window,
we check if there is no exception captured during this period too and
remove the probe from the configuration and un-instrument it.
This will prevent too much overhead for hot path
@jpbempeljpbempel added type: feature Enhancements and improvements comp: debugger Dynamic Instrumentation labels Jan 7, 2025
@jpbempel
jpbempel requested a review from a team as a code ownerJanuary 7, 2025 18:53
@jpbempel
jpbempel requested review from ojung and removed request for a teamJanuary 7, 2025 18:53
@pr-commenter

Copy link
Copy Markdown

Debugger benchmarks

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
ci_job_date17362764851736276866
end_time2025-01-07T19:02:422025-01-07T19:09:03
git_branchmasterjpbempel/failsafe-exception-replay-hot-path
git_commit_sha0b0310475156f6
start_time2025-01-07T19:01:262025-01-07T19:07:47
See matching parameters
BaselineCandidate
ci_job_id757399090757399090
ci_pipeline_id5236626352366263
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
git_commit_date17362748991736274899

Summary

Found 0 performance improvements and 5 performance regressions! Performance is the same for 3 metrics, 7 unstable metrics.

scenarioΔ mean agg_http_req_duration_minΔ mean agg_http_req_duration_p50Δ mean agg_http_req_duration_p75Δ mean agg_http_req_duration_p99Δ mean throughput
scenario:loopworse
[+389.889µs; +475.973µs] or [+3.742%; +4.568%]
worse
[+393.469µs; +497.275µs] or [+3.716%; +4.696%]
worse
[+355.590µs; +487.461µs] or [+3.328%; +4.562%]
worse
[+218.121µs; +826.171µs] or [+1.965%; +7.442%]
worse
[-4.724op/s; -2.820op/s] or [-5.054%; -3.017%]
See unchanged results
scenarioΔ mean agg_http_req_duration_minΔ mean agg_http_req_duration_p50Δ mean agg_http_req_duration_p75Δ mean agg_http_req_duration_p99Δ mean throughput
scenario:noprobeunstable
[-32022.597ns; +33451.142ns] or [-11.670%; +12.190%]
unstable
[-44521.506ns; +45199.545ns] or [-14.181%; +14.397%]
unstable
[-55.491µs; +59.246µs] or [-16.876%; +18.018%]
unstable
[-108.632µs; +128.895µs] or [-18.182%; +21.573%]
unstable
[-131.359op/s; +131.359op/s] or [-5.057%; +5.057%]
scenario:basicsamesamesameunstable
[-24.563µs; +57.212µs] or [-4.647%; +10.824%]
unstable
[-119.533op/s; +247.738op/s] or [-4.781%; +9.910%]
Request duration reports for reports
gantt
title reports - request duration [CI 0.99] : candidate=None, baseline=None
dateFormat X
axisFormat %s
section baseline
noprobe (313.955 µs) : 272, 355
. : milestone, 314,
basic (308.553 µs) : 298, 319
. : milestone, 309,
loop (10.589 ms) : 10528, 10649
. : milestone, 10589,
section candidate
noprobe (314.294 µs) : 270, 358
. : milestone, 314,
basic (305.025 µs) : 294, 316
. : milestone, 305,
loop (11.034 ms) : 11002, 11066
. : milestone, 11034,
Loading
  • baseline results
ScenarioRequest median duration [CI 0.99]
noprobe313.955 µs [272.464 µs, 355.447 µs]
basic308.553 µs [298.278 µs, 318.827 µs]
loop10.589 ms [10.528 ms, 10.649 ms]
  • candidate results
ScenarioRequest median duration [CI 0.99]
noprobe314.294 µs [270.3 µs, 358.288 µs]
basic305.025 µs [294.098 µs, 315.953 µs]
loop11.034 ms [11.002 ms, 11.066 ms]

@pr-commenter

Copy link
Copy Markdown

Benchmarks

Startup

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
git_branchmasterjpbempel/failsafe-exception-replay-hot-path
git_commit_date17362641701736274899
git_commit_sha0b0310475156f6
release_version1.45.0-SNAPSHOT~0b031046b31.45.0-SNAPSHOT~75156f6274
See matching parameters
BaselineCandidate
applicationinsecure-bankinsecure-bank
ci_job_date17362783211736278321
ci_job_id757399072757399072
ci_pipeline_id5236626352366263
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
moduleAgentAgent
parentNoneNone
variantiastiast

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 4 unstable metrics.

Startup time reports for petclinic
gantt
title petclinic - global startup overhead: candidate=1.45.0-SNAPSHOT~75156f6274, baseline=1.45.0-SNAPSHOT~0b031046b3
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.058 s) : 0, 1058483
Total [baseline] (10.438 s) : 0, 10437503
Agent [candidate] (1.059 s) : 0, 1059063
Total [candidate] (10.481 s) : 0, 10480904
section appsec
Agent [baseline] (1.187 s) : 0, 1186692
Total [baseline] (10.675 s) : 0, 10674633
Agent [candidate] (1.188 s) : 0, 1188008
Total [candidate] (10.696 s) : 0, 10696005
section iast
Agent [baseline] (1.185 s) : 0, 1184787
Total [baseline] (11.034 s) : 0, 11034455
Agent [candidate] (1.195 s) : 0, 1194514
Total [candidate] (11.049 s) : 0, 11048876
section profiling
Agent [baseline] (1.281 s) : 0, 1281133
Total [baseline] (10.796 s) : 0, 10795613
Agent [candidate] (1.289 s) : 0, 1289019
Total [candidate] (10.877 s) : 0, 10877109
Loading
  • baseline results
ModuleVariantDurationΔ tracing
Agenttracing1.058 s-
Agentappsec1.187 s128.208 ms (12.1%)
Agentiast1.185 s126.304 ms (11.9%)
Agentprofiling1.281 s222.65 ms (21.0%)
Totaltracing10.438 s-
Totalappsec10.675 s237.13 ms (2.3%)
Totaliast11.034 s596.952 ms (5.7%)
Totalprofiling10.796 s358.11 ms (3.4%)
  • candidate results
ModuleVariantDurationΔ tracing
Agenttracing1.059 s-
Agentappsec1.188 s128.945 ms (12.2%)
Agentiast1.195 s135.452 ms (12.8%)
Agentprofiling1.289 s229.956 ms (21.7%)
Totaltracing10.481 s-
Totalappsec10.696 s215.101 ms (2.1%)
Totaliast11.049 s567.972 ms (5.4%)
Totalprofiling10.877 s396.205 ms (3.8%)
gantt
title petclinic - break down per module: candidate=1.45.0-SNAPSHOT~75156f6274, baseline=1.45.0-SNAPSHOT~0b031046b3
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (716.34 ms) : 0, 716340
BytebuddyAgent [candidate] (714.061 ms) : 0, 714061
GlobalTracer [baseline] (255.75 ms) : 0, 255750
GlobalTracer [candidate] (258.126 ms) : 0, 258126
AppSec [baseline] (56.061 ms) : 0, 56061
AppSec [candidate] (55.814 ms) : 0, 55814
Remote Config [baseline] (724.048 µs) : 0, 724
Remote Config [candidate] (744.409 µs) : 0, 744
Telemetry [baseline] (14.578 ms) : 0, 14578
Telemetry [candidate] (15.272 ms) : 0, 15272
section appsec
BytebuddyAgent [baseline] (729.339 ms) : 0, 729339
BytebuddyAgent [candidate] (730.73 ms) : 0, 730730
GlobalTracer [baseline] (253.009 ms) : 0, 253009
GlobalTracer [candidate] (253.366 ms) : 0, 253366
AppSec [baseline] (170.842 ms) : 0, 170842
AppSec [candidate] (170.114 ms) : 0, 170114
Remote Config [baseline] (658.715 µs) : 0, 659
Remote Config [candidate] (657.089 µs) : 0, 657
Telemetry [baseline] (8.171 ms) : 0, 8171
Telemetry [candidate] (8.535 ms) : 0, 8535
IAST [baseline] (19.257 ms) : 0, 19257
IAST [candidate] (19.238 ms) : 0, 19238
section iast
BytebuddyAgent [baseline] (833.626 ms) : 0, 833626
BytebuddyAgent [candidate] (839.293 ms) : 0, 839293
GlobalTracer [baseline] (247.498 ms) : 0, 247498
GlobalTracer [candidate] (250.001 ms) : 0, 250001
AppSec [baseline] (57.924 ms) : 0, 57924
AppSec [candidate] (58.621 ms) : 0, 58621
Remote Config [baseline] (661.379 µs) : 0, 661
Remote Config [candidate] (668.568 µs) : 0, 669
Telemetry [baseline] (8.754 ms) : 0, 8754
Telemetry [candidate] (8.944 ms) : 0, 8944
IAST [baseline] (21.267 ms) : 0, 21267
IAST [candidate] (21.784 ms) : 0, 21784
section profiling
BytebuddyAgent [baseline] (704.945 ms) : 0, 704945
BytebuddyAgent [candidate] (708.692 ms) : 0, 708692
GlobalTracer [baseline] (374.469 ms) : 0, 374469
GlobalTracer [candidate] (377.534 ms) : 0, 377534
AppSec [baseline] (54.662 ms) : 0, 54662
AppSec [candidate] (54.847 ms) : 0, 54847
Remote Config [baseline] (668.265 µs) : 0, 668
Remote Config [candidate] (676.324 µs) : 0, 676
Telemetry [baseline] (8.118 ms) : 0, 8118
Telemetry [candidate] (8.136 ms) : 0, 8136
ProfilingAgent [baseline] (96.077 ms) : 0, 96077
ProfilingAgent [candidate] (96.871 ms) : 0, 96871
Profiling [baseline] (96.1 ms) : 0, 96100
Profiling [candidate] (96.895 ms) : 0, 96895
Loading
Startup time reports for insecure-bank
gantt
title insecure-bank - global startup overhead: candidate=1.45.0-SNAPSHOT~75156f6274, baseline=1.45.0-SNAPSHOT~0b031046b3
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.059 s) : 0, 1059221
Total [baseline] (8.636 s) : 0, 8636217
Agent [candidate] (1.064 s) : 0, 1064131
Total [candidate] (8.668 s) : 0, 8667572
section iast
Agent [baseline] (1.19 s) : 0, 1189842
Total [baseline] (9.227 s) : 0, 9227332
Agent [candidate] (1.185 s) : 0, 1185299
Total [candidate] (9.221 s) : 0, 9220515
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.184 s) : 0, 1183994
Total [baseline] (9.236 s) : 0, 9236072
Agent [candidate] (1.187 s) : 0, 1187354
Total [candidate] (9.183 s) : 0, 9182784
section iast_TELEMETRY_OFF
Agent [baseline] (1.176 s) : 0, 1176157
Total [baseline] (9.209 s) : 0, 9209247
Agent [candidate] (1.187 s) : 0, 1187354
Total [candidate] (9.279 s) : 0, 9279265
Loading
  • baseline results
ModuleVariantDurationΔ tracing
Agenttracing1.059 s-
Agentiast1.19 s130.621 ms (12.3%)
Agentiast_HARDCODED_SECRET_DISABLED1.184 s124.772 ms (11.8%)
Agentiast_TELEMETRY_OFF1.176 s116.936 ms (11.0%)
Totaltracing8.636 s-
Totaliast9.227 s591.115 ms (6.8%)
Totaliast_HARDCODED_SECRET_DISABLED9.236 s599.855 ms (6.9%)
Totaliast_TELEMETRY_OFF9.209 s573.03 ms (6.6%)
  • candidate results
ModuleVariantDurationΔ tracing
Agenttracing1.064 s-
Agentiast1.185 s121.168 ms (11.4%)
Agentiast_HARDCODED_SECRET_DISABLED1.187 s123.223 ms (11.6%)
Agentiast_TELEMETRY_OFF1.187 s123.223 ms (11.6%)
Totaltracing8.668 s-
Totaliast9.221 s552.943 ms (6.4%)
Totaliast_HARDCODED_SECRET_DISABLED9.183 s515.212 ms (5.9%)
Totaliast_TELEMETRY_OFF9.279 s611.693 ms (7.1%)
gantt
title insecure-bank - break down per module: candidate=1.45.0-SNAPSHOT~75156f6274, baseline=1.45.0-SNAPSHOT~0b031046b3
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (715.482 ms) : 0, 715482
BytebuddyAgent [candidate] (718.076 ms) : 0, 718076
GlobalTracer [baseline] (256.162 ms) : 0, 256162
GlobalTracer [candidate] (258.309 ms) : 0, 258309
AppSec [baseline] (57.482 ms) : 0, 57482
AppSec [candidate] (57.142 ms) : 0, 57142
Remote Config [baseline] (720.246 µs) : 0, 720
Remote Config [candidate] (731.012 µs) : 0, 731
Telemetry [baseline] (14.46 ms) : 0, 14460
Telemetry [candidate] (14.656 ms) : 0, 14656
section iast
BytebuddyAgent [baseline] (837.249 ms) : 0, 837249
BytebuddyAgent [candidate] (832.588 ms) : 0, 832588
GlobalTracer [baseline] (248.363 ms) : 0, 248363
GlobalTracer [candidate] (248.652 ms) : 0, 248652
AppSec [baseline] (58.37 ms) : 0, 58370
AppSec [candidate] (58.324 ms) : 0, 58324
Remote Config [baseline] (661.299 µs) : 0, 661
Remote Config [candidate] (653.78 µs) : 0, 654
Telemetry [baseline] (8.794 ms) : 0, 8794
Telemetry [candidate] (8.866 ms) : 0, 8866
IAST [baseline] (21.314 ms) : 0, 21314
IAST [candidate] (21.181 ms) : 0, 21181
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (832.521 ms) : 0, 832521
BytebuddyAgent [candidate] (835.415 ms) : 0, 835415
GlobalTracer [baseline] (247.132 ms) : 0, 247132
GlobalTracer [candidate] (248.084 ms) : 0, 248084
AppSec [baseline] (58.339 ms) : 0, 58339
AppSec [candidate] (58.327 ms) : 0, 58327
Remote Config [baseline] (667.105 µs) : 0, 667
Remote Config [candidate] (646.681 µs) : 0, 647
Telemetry [baseline] (8.866 ms) : 0, 8866
Telemetry [candidate] (8.688 ms) : 0, 8688
IAST [baseline] (21.409 ms) : 0, 21409
IAST [candidate] (21.015 ms) : 0, 21015
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (826.603 ms) : 0, 826603
BytebuddyAgent [candidate] (834.83 ms) : 0, 834830
GlobalTracer [baseline] (246.702 ms) : 0, 246702
GlobalTracer [candidate] (248.783 ms) : 0, 248783
AppSec [baseline] (57.862 ms) : 0, 57862
AppSec [candidate] (58.374 ms) : 0, 58374
Remote Config [baseline] (653.348 µs) : 0, 653
Remote Config [candidate] (657.488 µs) : 0, 657
Telemetry [baseline] (8.569 ms) : 0, 8569
Telemetry [candidate] (8.668 ms) : 0, 8668
IAST [baseline] (20.769 ms) : 0, 20769
IAST [candidate] (20.776 ms) : 0, 20776
Loading

Load

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
end_time2025-01-07T19:02:292025-01-07T19:09:24
git_branchmasterjpbempel/failsafe-exception-replay-hot-path
git_commit_date17362641701736274899
git_commit_sha0b0310475156f6
release_version1.45.0-SNAPSHOT~0b031046b31.45.0-SNAPSHOT~75156f6274
start_time2025-01-07T19:02:162025-01-07T19:09:11
See matching parameters
BaselineCandidate
applicationinsecure-bankinsecure-bank
ci_job_date17362773151736277315
ci_job_id757399075757399075
ci_pipeline_id5236626352366263
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variantiastiast

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 17 unstable metrics.

Request duration reports for petclinic
gantt
title petclinic - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~75156f6274, baseline=1.45.0-SNAPSHOT~0b031046b3
dateFormat X
axisFormat %s
section baseline
no_agent (1.341 ms) : 1321, 1361
. : milestone, 1341,
appsec (1.727 ms) : 1704, 1750
. : milestone, 1727,
appsec_no_iast (1.769 ms) : 1746, 1792
. : milestone, 1769,
iast (1.472 ms) : 1449, 1495
. : milestone, 1472,
profiling (1.505 ms) : 1481, 1530
. : milestone, 1505,
tracing (1.473 ms) : 1448, 1498
. : milestone, 1473,
section candidate
no_agent (1.344 ms) : 1324, 1365
. : milestone, 1344,
appsec (1.742 ms) : 1719, 1766
. : milestone, 1742,
appsec_no_iast (1.769 ms) : 1745, 1793
. : milestone, 1769,
iast (1.478 ms) : 1455, 1501
. : milestone, 1478,
profiling (1.485 ms) : 1461, 1508
. : milestone, 1485,
tracing (1.464 ms) : 1439, 1489
. : milestone, 1464,
Loading
  • baseline results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent1.341 ms [1.321 ms, 1.361 ms]-
appsec1.727 ms [1.704 ms, 1.75 ms]385.981 µs (28.8%)
appsec_no_iast1.769 ms [1.746 ms, 1.792 ms]427.826 µs (31.9%)
iast1.472 ms [1.449 ms, 1.495 ms]131.208 µs (9.8%)
profiling1.505 ms [1.481 ms, 1.53 ms]164.479 µs (12.3%)
tracing1.473 ms [1.448 ms, 1.498 ms]132.205 µs (9.9%)
  • candidate results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent1.344 ms [1.324 ms, 1.365 ms]-
appsec1.742 ms [1.719 ms, 1.766 ms]397.94 µs (29.6%)
appsec_no_iast1.769 ms [1.745 ms, 1.793 ms]424.448 µs (31.6%)
iast1.478 ms [1.455 ms, 1.501 ms]133.369 µs (9.9%)
profiling1.485 ms [1.461 ms, 1.508 ms]140.469 µs (10.4%)
tracing1.464 ms [1.439 ms, 1.489 ms]119.304 µs (8.9%)
Request duration reports for insecure-bank
gantt
title insecure-bank - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~75156f6274, baseline=1.45.0-SNAPSHOT~0b031046b3
dateFormat X
axisFormat %s
section baseline
no_agent (375.015 µs) : 354, 396
. : milestone, 375,
iast (492.121 µs) : 470, 514
. : milestone, 492,
iast_FULL (646.172 µs) : 624, 668
. : milestone, 646,
iast_GLOBAL (518.436 µs) : 496, 541
. : milestone, 518,
iast_HARDCODED_SECRET_DISABLED (486.381 µs) : 465, 508
. : milestone, 486,
iast_INACTIVE (445.304 µs) : 424, 466
. : milestone, 445,
iast_TELEMETRY_OFF (471.681 µs) : 451, 493
. : milestone, 472,
tracing (448.772 µs) : 427, 470
. : milestone, 449,
section candidate
no_agent (369.508 µs) : 350, 389
. : milestone, 370,
iast (493.757 µs) : 472, 516
. : milestone, 494,
iast_FULL (643.213 µs) : 622, 665
. : milestone, 643,
iast_GLOBAL (527.492 µs) : 505, 550
. : milestone, 527,
iast_HARDCODED_SECRET_DISABLED (489.295 µs) : 468, 511
. : milestone, 489,
iast_INACTIVE (446.664 µs) : 426, 468
. : milestone, 447,
iast_TELEMETRY_OFF (483.942 µs) : 462, 506
. : milestone, 484,
tracing (447.974 µs) : 427, 469
. : milestone, 448,
Loading
  • baseline results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent375.015 µs [353.867 µs, 396.162 µs]-
iast492.121 µs [469.979 µs, 514.262 µs]117.106 µs (31.2%)
iast_FULL646.172 µs [624.452 µs, 667.892 µs]271.157 µs (72.3%)
iast_GLOBAL518.436 µs [496.016 µs, 540.856 µs]143.421 µs (38.2%)
iast_HARDCODED_SECRET_DISABLED486.381 µs [465.23 µs, 507.532 µs]111.366 µs (29.7%)
iast_INACTIVE445.304 µs [424.477 µs, 466.131 µs]70.29 µs (18.7%)
iast_TELEMETRY_OFF471.681 µs [450.504 µs, 492.857 µs]96.666 µs (25.8%)
tracing448.772 µs [427.276 µs, 470.268 µs]73.757 µs (19.7%)
  • candidate results
VariantRequest duration [CI 0.99]Δ no_agent
no_agent369.508 µs [349.71 µs, 389.306 µs]-
iast493.757 µs [471.693 µs, 515.822 µs]124.25 µs (33.6%)
iast_FULL643.213 µs [621.649 µs, 664.778 µs]273.706 µs (74.1%)
iast_GLOBAL527.492 µs [504.735 µs, 550.249 µs]157.984 µs (42.8%)
iast_HARDCODED_SECRET_DISABLED489.295 µs [467.684 µs, 510.907 µs]119.788 µs (32.4%)
iast_INACTIVE446.664 µs [425.513 µs, 467.815 µs]77.156 µs (20.9%)
iast_TELEMETRY_OFF483.942 µs [462.272 µs, 505.612 µs]114.434 µs (31.0%)
tracing447.974 µs [427.177 µs, 468.77 µs]78.466 µs (21.2%)

Dacapo

Parameters

BaselineCandidate
baseline_or_candidatebaselinecandidate
git_branchmasterjpbempel/failsafe-exception-replay-hot-path
git_commit_date17362641701736274899
git_commit_sha0b0310475156f6
release_version1.45.0-SNAPSHOT~0b031046b31.45.0-SNAPSHOT~75156f6274
See matching parameters
BaselineCandidate
applicationbiojavabiojava
ci_job_date17362778521736277852
ci_job_id757399079757399079
ci_pipeline_id5236626352366263
cpu_modelIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHzIntel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variantappsecappsec

Summary

Found 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics.

Execution time for biojava
gantt
title biojava - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~75156f6274, baseline=1.45.0-SNAPSHOT~0b031046b3
dateFormat X
axisFormat %s
section baseline
no_agent (15.43 s) : 15430000, 15430000
. : milestone, 15430000,
appsec (15.062 s) : 15062000, 15062000
. : milestone, 15062000,
iast (18.963 s) : 18963000, 18963000
. : milestone, 18963000,
iast_GLOBAL (18.256 s) : 18256000, 18256000
. : milestone, 18256000,
profiling (15.213 s) : 15213000, 15213000
. : milestone, 15213000,
tracing (14.812 s) : 14812000, 14812000
. : milestone, 14812000,
section candidate
no_agent (15.282 s) : 15282000, 15282000
. : milestone, 15282000,
appsec (14.929 s) : 14929000, 14929000
. : milestone, 14929000,
iast (18.989 s) : 18989000, 18989000
. : milestone, 18989000,
iast_GLOBAL (17.631 s) : 17631000, 17631000
. : milestone, 17631000,
profiling (15.097 s) : 15097000, 15097000
. : milestone, 15097000,
tracing (14.956 s) : 14956000, 14956000
. : milestone, 14956000,
Loading
  • baseline results
VariantExecution Time [CI 0.99]Δ no_agent
no_agent15.43 s [15.43 s, 15.43 s]-
appsec15.062 s [15.062 s, 15.062 s]-368.0 ms (-2.4%)
iast18.963 s [18.963 s, 18.963 s]3.533 s (22.9%)
iast_GLOBAL18.256 s [18.256 s, 18.256 s]2.826 s (18.3%)
profiling15.213 s [15.213 s, 15.213 s]-217.0 ms (-1.4%)
tracing14.812 s [14.812 s, 14.812 s]-618.0 ms (-4.0%)
  • candidate results
VariantExecution Time [CI 0.99]Δ no_agent
no_agent15.282 s [15.282 s, 15.282 s]-
appsec14.929 s [14.929 s, 14.929 s]-353.0 ms (-2.3%)
iast18.989 s [18.989 s, 18.989 s]3.707 s (24.3%)
iast_GLOBAL17.631 s [17.631 s, 17.631 s]2.349 s (15.4%)
profiling15.097 s [15.097 s, 15.097 s]-185.0 ms (-1.2%)
tracing14.956 s [14.956 s, 14.956 s]-326.0 ms (-2.1%)
Execution time for tomcat
gantt
title tomcat - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~75156f6274, baseline=1.45.0-SNAPSHOT~0b031046b3
dateFormat X
axisFormat %s
section baseline
no_agent (1.471 ms) : 1459, 1482
. : milestone, 1471,
appsec (2.347 ms) : 2305, 2390
. : milestone, 2347,
iast (2.112 ms) : 2058, 2166
. : milestone, 2112,
iast_GLOBAL (2.15 ms) : 2096, 2204
. : milestone, 2150,
profiling (1.958 ms) : 1915, 2001
. : milestone, 1958,
tracing (1.951 ms) : 1910, 1993
. : milestone, 1951,
section candidate
no_agent (1.473 ms) : 1462, 1485
. : milestone, 1473,
appsec (2.362 ms) : 2319, 2405
. : milestone, 2362,
iast (2.103 ms) : 2049, 2158
. : milestone, 2103,
iast_GLOBAL (2.154 ms) : 2100, 2209
. : milestone, 2154,
profiling (1.955 ms) : 1912, 1998
. : milestone, 1955,
tracing (1.949 ms) : 1906, 1991
. : milestone, 1949,
Loading
  • baseline results
VariantExecution Time [CI 0.99]Δ no_agent
no_agent1.471 ms [1.459 ms, 1.482 ms]-
appsec2.347 ms [2.305 ms, 2.39 ms]876.814 µs (59.6%)
iast2.112 ms [2.058 ms, 2.166 ms]641.285 µs (43.6%)
iast_GLOBAL2.15 ms [2.096 ms, 2.204 ms]679.064 µs (46.2%)
profiling1.958 ms [1.915 ms, 2.001 ms]487.04 µs (33.1%)
tracing1.951 ms [1.91 ms, 1.993 ms]480.842 µs (32.7%)
  • candidate results
VariantExecution Time [CI 0.99]Δ no_agent
no_agent1.473 ms [1.462 ms, 1.485 ms]-
appsec2.362 ms [2.319 ms, 2.405 ms]888.767 µs (60.3%)
iast2.103 ms [2.049 ms, 2.158 ms]630.269 µs (42.8%)
iast_GLOBAL2.154 ms [2.1 ms, 2.209 ms]681.281 µs (46.2%)
profiling1.955 ms [1.912 ms, 1.998 ms]482.066 µs (32.7%)
tracing1.949 ms [1.906 ms, 1.991 ms]475.423 µs (32.3%)

@shatzishatzi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are few things that are missing for me in this:

  1. the default rate limit seem to be off - 100/s for method doesn't seem high to me. specifically for handler methods that have <1% error rate..
  2. we don't report to the UI that we removed the instrumentation for the probe and let the user understand why the exception replay is not capturing specific frames.
  3. we don't report telemetry to keep track that this feature works.
  4. On one side, we are keeping instrumenting the hot frames if there multiple exception with the same frames. although we detect it was hot. I think we need to keep a list of hot frames - maybe even report that on a flare.

if (exceptionProbeManager.shouldRemoveProbe(lastCaptureTime)) {
// hot loop without exception captured => uninstrument this probe
LOGGER.debug("Removing probe {}", id);
exceptionProbeManager.removeProbe(this);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to report this?

  1. maybe this should be trigger telemetry log event so we know how many times this happen to us.
  2. we we do capture the exception. should we report on that user frame as "HOT STUFF" so the UI would be able to display a message for the user why this frame was not captured?

private final transient ExceptionProbeManager exceptionProbeManager;
private final transient int chainedExceptionIdx;
private final transient CircuitBreaker circuitBreaker =
new CircuitBreaker(1000, Duration.ofSeconds(HOT_LOOP_TIME_WINDOW_IN_SECONDS));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to make the 1000 configurable? currently any method that run more then 100 times a second will be filtered out.

How are we going to refine this value? what is the plan?

@Override
public void evaluate(
CapturedContext context, CapturedContext.Status status, MethodLocation methodLocation) {
if (!circuitBreaker.trip()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this run after the check methodLocation != MethodLocation.EXIT ? or maybe it is not a thing... but if it is - then this trip() is get called twice?

@jpbempel

Copy link
Copy Markdown
MemberAuthor

Withdrawn because superseded by #8230

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: debuggerDynamic Instrumentationtype: featureEnhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jpbempel@shatzi