Skip to content

Conversation

@amarziali
Copy link
Contributor

What Does This Do

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@amarziali amarziali requested review from a team as code owners July 4, 2025 10:12
@amarziali amarziali requested a review from PerfectSlayer July 4, 2025 10:12
*
* @return The HTML snippet to inject, {@code null} if RUM injection is disabled to inject.
*/
public static byte[] getSnippet(String encoding) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@PerfectSlayer I changed the signature of those since the injector works with raw bytes. I put in place a reasonable cache per encoding

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good to me! 👍

@pr-commenter
Copy link

pr-commenter bot commented Jul 4, 2025

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/rum
git_commit_date 1751624203 1751631104
git_commit_sha 9ad6afd 486ee57
release_version 1.51.0-SNAPSHOT~9ad6afd361 1.51.0-SNAPSHOT~486ee57a40
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1751632960 1751632960
ci_job_id 1014202606 1014202606
ci_pipeline_id 69667636 69667636
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-2-y3sjs7qx 6.8.0-1030-aws #32~22.04.1-Ubuntu SMP Thu Jun 5 08:38:24 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-2-y3sjs7qx 6.8.0-1030-aws #32~22.04.1-Ubuntu SMP Thu Jun 5 08:38:24 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
module Agent Agent
parent None None

Summary

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

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.51.0-SNAPSHOT~486ee57a40, baseline=1.51.0-SNAPSHOT~9ad6afd361

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (996.075 ms) : 0, 996075
Total [baseline] (10.631 s) : 0, 10631105
Agent [candidate] (993.568 ms) : 0, 993568
Total [candidate] (10.624 s) : 0, 10623947
section appsec
Agent [baseline] (1.174 s) : 0, 1174269
Total [baseline] (10.831 s) : 0, 10830735
Agent [candidate] (1.176 s) : 0, 1175620
Total [candidate] (10.716 s) : 0, 10715628
section iast
Agent [baseline] (1.141 s) : 0, 1141334
Total [baseline] (10.994 s) : 0, 10994386
Agent [candidate] (1.137 s) : 0, 1137330
Total [candidate] (10.839 s) : 0, 10838638
section profiling
Agent [baseline] (1.247 s) : 0, 1247230
Total [baseline] (10.917 s) : 0, 10916573
Agent [candidate] (1.254 s) : 0, 1253795
Total [candidate] (11.004 s) : 0, 11003935
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 996.075 ms -
Agent appsec 1.174 s 178.194 ms (17.9%)
Agent iast 1.141 s 145.259 ms (14.6%)
Agent profiling 1.247 s 251.155 ms (25.2%)
Total tracing 10.631 s -
Total appsec 10.831 s 199.63 ms (1.9%)
Total iast 10.994 s 363.281 ms (3.4%)
Total profiling 10.917 s 285.468 ms (2.7%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 993.568 ms -
Agent appsec 1.176 s 182.052 ms (18.3%)
Agent iast 1.137 s 143.762 ms (14.5%)
Agent profiling 1.254 s 260.227 ms (26.2%)
Total tracing 10.624 s -
Total appsec 10.716 s 91.682 ms (0.9%)
Total iast 10.839 s 214.691 ms (2.0%)
Total profiling 11.004 s 379.989 ms (3.6%)
gantt
    title petclinic - break down per module: candidate=1.51.0-SNAPSHOT~486ee57a40, baseline=1.51.0-SNAPSHOT~9ad6afd361

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (687.12 ms) : 0, 687120
BytebuddyAgent [candidate] (686.254 ms) : 0, 686254
GlobalTracer [baseline] (242.452 ms) : 0, 242452
GlobalTracer [candidate] (241.577 ms) : 0, 241577
AppSec [baseline] (30.262 ms) : 0, 30262
AppSec [candidate] (30.105 ms) : 0, 30105
Debugger [baseline] (6.03 ms) : 0, 6030
Debugger [candidate] (6.034 ms) : 0, 6034
Remote Config [baseline] (684.935 µs) : 0, 685
Remote Config [candidate] (680.909 µs) : 0, 681
Telemetry [baseline] (8.214 ms) : 0, 8214
Telemetry [candidate] (8.19 ms) : 0, 8190
section appsec
BytebuddyAgent [baseline] (710.017 ms) : 0, 710017
BytebuddyAgent [candidate] (709.944 ms) : 0, 709944
GlobalTracer [baseline] (234.895 ms) : 0, 234895
GlobalTracer [candidate] (235.666 ms) : 0, 235666
AppSec [baseline] (170.348 ms) : 0, 170348
AppSec [candidate] (171.505 ms) : 0, 171505
Debugger [baseline] (5.797 ms) : 0, 5797
Debugger [candidate] (5.751 ms) : 0, 5751
Remote Config [baseline] (603.285 µs) : 0, 603
Remote Config [candidate] (593.677 µs) : 0, 594
Telemetry [baseline] (8.134 ms) : 0, 8134
Telemetry [candidate] (8.076 ms) : 0, 8076
IAST [baseline] (23.059 ms) : 0, 23059
IAST [candidate] (23.31 ms) : 0, 23310
section iast
BytebuddyAgent [baseline] (813.175 ms) : 0, 813175
BytebuddyAgent [candidate] (809.637 ms) : 0, 809637
GlobalTracer [baseline] (233.912 ms) : 0, 233912
GlobalTracer [candidate] (234.35 ms) : 0, 234350
AppSec [baseline] (30.164 ms) : 0, 30164
AppSec [candidate] (28.838 ms) : 0, 28838
Debugger [baseline] (5.891 ms) : 0, 5891
Debugger [candidate] (5.9 ms) : 0, 5900
Remote Config [baseline] (604.628 µs) : 0, 605
Remote Config [candidate] (596.392 µs) : 0, 596
Telemetry [baseline] (8.072 ms) : 0, 8072
Telemetry [candidate] (8.191 ms) : 0, 8191
IAST [baseline] (27.943 ms) : 0, 27943
IAST [candidate] (28.187 ms) : 0, 28187
section profiling
ProfilingAgent [baseline] (102.954 ms) : 0, 102954
ProfilingAgent [candidate] (105.35 ms) : 0, 105350
BytebuddyAgent [baseline] (681.49 ms) : 0, 681490
BytebuddyAgent [candidate] (682.255 ms) : 0, 682255
GlobalTracer [baseline] (360.633 ms) : 0, 360633
GlobalTracer [candidate] (363.278 ms) : 0, 363278
AppSec [baseline] (31.417 ms) : 0, 31417
AppSec [candidate] (32.634 ms) : 0, 32634
Debugger [baseline] (12.845 ms) : 0, 12845
Debugger [candidate] (11.057 ms) : 0, 11057
Remote Config [baseline] (664.525 µs) : 0, 665
Remote Config [candidate] (669.383 µs) : 0, 669
Telemetry [baseline] (7.985 ms) : 0, 7985
Telemetry [candidate] (8.858 ms) : 0, 8858
Profiling [baseline] (102.978 ms) : 0, 102978
Profiling [candidate] (105.375 ms) : 0, 105375
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.51.0-SNAPSHOT~486ee57a40, baseline=1.51.0-SNAPSHOT~9ad6afd361

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.001 s) : 0, 1001322
Total [baseline] (8.564 s) : 0, 8564242
Agent [candidate] (995.317 ms) : 0, 995317
Total [candidate] (8.565 s) : 0, 8565436
section iast
Agent [baseline] (1.132 s) : 0, 1132255
Total [baseline] (9.261 s) : 0, 9260604
Agent [candidate] (1.132 s) : 0, 1132320
Total [candidate] (9.283 s) : 0, 9282676
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.001 s -
Agent iast 1.132 s 130.933 ms (13.1%)
Total tracing 8.564 s -
Total iast 9.261 s 696.362 ms (8.1%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 995.317 ms -
Agent iast 1.132 s 137.002 ms (13.8%)
Total tracing 8.565 s -
Total iast 9.283 s 717.24 ms (8.4%)
gantt
    title insecure-bank - break down per module: candidate=1.51.0-SNAPSHOT~486ee57a40, baseline=1.51.0-SNAPSHOT~9ad6afd361

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (692.648 ms) : 0, 692648
BytebuddyAgent [candidate] (687.155 ms) : 0, 687155
GlobalTracer [baseline] (241.438 ms) : 0, 241438
GlobalTracer [candidate] (242.045 ms) : 0, 242045
AppSec [baseline] (30.126 ms) : 0, 30126
AppSec [candidate] (30.351 ms) : 0, 30351
Debugger [baseline] (6.061 ms) : 0, 6061
Debugger [candidate] (6.038 ms) : 0, 6038
Remote Config [baseline] (679.915 µs) : 0, 680
Remote Config [candidate] (676.326 µs) : 0, 676
Telemetry [baseline] (8.934 ms) : 0, 8934
Telemetry [candidate] (8.236 ms) : 0, 8236
section iast
BytebuddyAgent [baseline] (806.419 ms) : 0, 806419
BytebuddyAgent [candidate] (807.44 ms) : 0, 807440
GlobalTracer [baseline] (232.375 ms) : 0, 232375
GlobalTracer [candidate] (232.557 ms) : 0, 232557
AppSec [baseline] (29.857 ms) : 0, 29857
AppSec [candidate] (29.325 ms) : 0, 29325
Debugger [baseline] (6.59 ms) : 0, 6590
Debugger [candidate] (5.84 ms) : 0, 5840
Remote Config [baseline] (579.464 µs) : 0, 579
Remote Config [candidate] (587.116 µs) : 0, 587
Telemetry [baseline] (8.02 ms) : 0, 8020
Telemetry [candidate] (7.994 ms) : 0, 7994
IAST [baseline] (26.974 ms) : 0, 26974
IAST [candidate] (27.815 ms) : 0, 27815
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/rum
git_commit_date 1751624203 1751631104
git_commit_sha 9ad6afd 486ee57
release_version 1.51.0-SNAPSHOT~9ad6afd361 1.51.0-SNAPSHOT~486ee57a40
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1751632643 1751632643
ci_job_id 1014202607 1014202607
ci_pipeline_id 69667636 69667636
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-3-dnl7yh7l 6.8.0-1030-aws #32~22.04.1-Ubuntu SMP Thu Jun 5 08:38:24 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-3-dnl7yh7l 6.8.0-1030-aws #32~22.04.1-Ubuntu SMP Thu Jun 5 08:38:24 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

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

scenario Δ mean http_req_duration Δ mean throughput candidate mean http_req_duration candidate mean throughput baseline mean http_req_duration baseline mean throughput
scenario:load:insecure-bank:tracing:high_load worse
[+373.368µs; +616.954µs] or [+4.949%; +8.177%]
unstable
[-110.217op/s; +35.592op/s] or [-17.963%; +5.801%]
8.040ms 576.281op/s 7.545ms 613.594op/s
scenario:load:insecure-bank:iast:high_load better
[-840.406µs; -497.654µs] or [-8.403%; -4.976%]
unstable
[-24.200op/s; +90.387op/s] or [-5.213%; +19.470%]
9.332ms 497.344op/s 10.001ms 464.250op/s
scenario:load:petclinic:profiling:high_load worse
[+1.721ms; +2.704ms] or [+3.652%; +5.739%]
unstable
[-10.007op/s; +3.609op/s] or [-10.079%; +3.635%]
49.325ms 96.089op/s 47.112ms 99.287op/s
scenario:load:petclinic:appsec:high_load better
[-3.414ms; -2.524ms] or [-6.945%; -5.133%]
unstable
[+2.456op/s; +14.837op/s] or [+2.579%; +15.583%]
46.194ms 103.859op/s 49.163ms 95.213op/s
scenario:load:petclinic:code_origins:high_load better
[-2.057ms; -1.171ms] or [-4.341%; -2.472%]
unstable
[-0.328op/s; +12.470op/s] or [-0.332%; +12.625%]
45.759ms 104.846op/s 47.372ms 98.775op/s
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.51.0-SNAPSHOT~486ee57a40, baseline=1.51.0-SNAPSHOT~9ad6afd361
    dateFormat X
    axisFormat %s
section baseline
no_agent (4.425 ms) : 4375, 4474
.   : milestone, 4425,
iast (10.001 ms) : 9834, 10167
.   : milestone, 10001,
iast_FULL (14.171 ms) : 13888, 14455
.   : milestone, 14171,
iast_GLOBAL (10.678 ms) : 10480, 10875
.   : milestone, 10678,
profiling (8.894 ms) : 8751, 9037
.   : milestone, 8894,
tracing (7.545 ms) : 7436, 7653
.   : milestone, 7545,
section candidate
no_agent (4.315 ms) : 4258, 4373
.   : milestone, 4315,
iast (9.332 ms) : 9180, 9483
.   : milestone, 9332,
iast_FULL (14.39 ms) : 14105, 14675
.   : milestone, 14390,
iast_GLOBAL (10.516 ms) : 10332, 10700
.   : milestone, 10516,
profiling (8.747 ms) : 8615, 8879
.   : milestone, 8747,
tracing (8.04 ms) : 7922, 8157
.   : milestone, 8040,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.425 ms [4.375 ms, 4.474 ms] -
iast 10.001 ms [9.834 ms, 10.167 ms] 5.576 ms (126.0%)
iast_FULL 14.171 ms [13.888 ms, 14.455 ms] 9.747 ms (220.3%)
iast_GLOBAL 10.678 ms [10.48 ms, 10.875 ms] 6.253 ms (141.3%)
profiling 8.894 ms [8.751 ms, 9.037 ms] 4.47 ms (101.0%)
tracing 7.545 ms [7.436 ms, 7.653 ms] 3.12 ms (70.5%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 4.315 ms [4.258 ms, 4.373 ms] -
iast 9.332 ms [9.18 ms, 9.483 ms] 5.017 ms (116.3%)
iast_FULL 14.39 ms [14.105 ms, 14.675 ms] 10.075 ms (233.5%)
iast_GLOBAL 10.516 ms [10.332 ms, 10.7 ms] 6.201 ms (143.7%)
profiling 8.747 ms [8.615 ms, 8.879 ms] 4.432 ms (102.7%)
tracing 8.04 ms [7.922 ms, 8.157 ms] 3.725 ms (86.3%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.51.0-SNAPSHOT~486ee57a40, baseline=1.51.0-SNAPSHOT~9ad6afd361
    dateFormat X
    axisFormat %s
section baseline
no_agent (38.402 ms) : 38090, 38714
.   : milestone, 38402,
appsec (49.163 ms) : 48727, 49599
.   : milestone, 49163,
code_origins (47.372 ms) : 46967, 47778
.   : milestone, 47372,
iast (45.562 ms) : 45160, 45964
.   : milestone, 45562,
profiling (47.112 ms) : 46653, 47572
.   : milestone, 47112,
tracing (44.357 ms) : 44000, 44714
.   : milestone, 44357,
section candidate
no_agent (38.063 ms) : 37745, 38382
.   : milestone, 38063,
appsec (46.194 ms) : 45804, 46585
.   : milestone, 46194,
code_origins (45.759 ms) : 45341, 46176
.   : milestone, 45759,
iast (45.436 ms) : 45033, 45839
.   : milestone, 45436,
profiling (49.325 ms) : 48870, 49779
.   : milestone, 49325,
tracing (44.214 ms) : 43841, 44588
.   : milestone, 44214,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 38.402 ms [38.09 ms, 38.714 ms] -
appsec 49.163 ms [48.727 ms, 49.599 ms] 10.761 ms (28.0%)
code_origins 47.372 ms [46.967 ms, 47.778 ms] 8.97 ms (23.4%)
iast 45.562 ms [45.16 ms, 45.964 ms] 7.159 ms (18.6%)
profiling 47.112 ms [46.653 ms, 47.572 ms] 8.71 ms (22.7%)
tracing 44.357 ms [44.0 ms, 44.714 ms] 5.955 ms (15.5%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 38.063 ms [37.745 ms, 38.382 ms] -
appsec 46.194 ms [45.804 ms, 46.585 ms] 8.131 ms (21.4%)
code_origins 45.759 ms [45.341 ms, 46.176 ms] 7.695 ms (20.2%)
iast 45.436 ms [45.033 ms, 45.839 ms] 7.373 ms (19.4%)
profiling 49.325 ms [48.87 ms, 49.779 ms] 11.261 ms (29.6%)
tracing 44.214 ms [43.841 ms, 44.588 ms] 6.151 ms (16.2%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/rum
git_commit_date 1751624203 1751631104
git_commit_sha 9ad6afd 486ee57
release_version 1.51.0-SNAPSHOT~9ad6afd361 1.51.0-SNAPSHOT~486ee57a40
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1751633130 1751633130
ci_job_id 1014202609 1014202609
ci_pipeline_id 69667636 69667636
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
kernel_version Linux runner-zfyrx7zua-project-304-concurrent-1-pq7vm6sv 6.8.0-1030-aws #32~22.04.1-Ubuntu SMP Thu Jun 5 08:38:24 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Linux runner-zfyrx7zua-project-304-concurrent-1-pq7vm6sv 6.8.0-1030-aws #32~22.04.1-Ubuntu SMP Thu Jun 5 08:38:24 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Summary

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

Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.51.0-SNAPSHOT~486ee57a40, baseline=1.51.0-SNAPSHOT~9ad6afd361
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.468 ms) : 1457, 1480
.   : milestone, 1468,
appsec (2.397 ms) : 2348, 2446
.   : milestone, 2397,
iast (2.193 ms) : 2130, 2255
.   : milestone, 2193,
iast_GLOBAL (2.233 ms) : 2170, 2295
.   : milestone, 2233,
profiling (2.029 ms) : 1979, 2079
.   : milestone, 2029,
tracing (2.013 ms) : 1964, 2061
.   : milestone, 2013,
section candidate
no_agent (1.471 ms) : 1459, 1482
.   : milestone, 1471,
appsec (2.404 ms) : 2354, 2453
.   : milestone, 2404,
iast (2.197 ms) : 2135, 2260
.   : milestone, 2197,
iast_GLOBAL (2.237 ms) : 2175, 2300
.   : milestone, 2237,
profiling (2.04 ms) : 1990, 2090
.   : milestone, 2040,
tracing (2.003 ms) : 1955, 2051
.   : milestone, 2003,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.468 ms [1.457 ms, 1.48 ms] -
appsec 2.397 ms [2.348 ms, 2.446 ms] 929.046 µs (63.3%)
iast 2.193 ms [2.13 ms, 2.255 ms] 724.554 µs (49.4%)
iast_GLOBAL 2.233 ms [2.17 ms, 2.295 ms] 764.362 µs (52.1%)
profiling 2.029 ms [1.979 ms, 2.079 ms] 560.894 µs (38.2%)
tracing 2.013 ms [1.964 ms, 2.061 ms] 544.469 µs (37.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.471 ms [1.459 ms, 1.482 ms] -
appsec 2.404 ms [2.354 ms, 2.453 ms] 932.726 µs (63.4%)
iast 2.197 ms [2.135 ms, 2.26 ms] 726.491 µs (49.4%)
iast_GLOBAL 2.237 ms [2.175 ms, 2.3 ms] 766.351 µs (52.1%)
profiling 2.04 ms [1.99 ms, 2.09 ms] 568.821 µs (38.7%)
tracing 2.003 ms [1.955 ms, 2.051 ms] 531.869 µs (36.2%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.51.0-SNAPSHOT~486ee57a40, baseline=1.51.0-SNAPSHOT~9ad6afd361
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.494 s) : 15494000, 15494000
.   : milestone, 15494000,
appsec (14.608 s) : 14608000, 14608000
.   : milestone, 14608000,
iast (18.811 s) : 18811000, 18811000
.   : milestone, 18811000,
iast_GLOBAL (18.106 s) : 18106000, 18106000
.   : milestone, 18106000,
profiling (15.162 s) : 15162000, 15162000
.   : milestone, 15162000,
tracing (14.833 s) : 14833000, 14833000
.   : milestone, 14833000,
section candidate
no_agent (14.864 s) : 14864000, 14864000
.   : milestone, 14864000,
appsec (14.88 s) : 14880000, 14880000
.   : milestone, 14880000,
iast (18.586 s) : 18586000, 18586000
.   : milestone, 18586000,
iast_GLOBAL (18.012 s) : 18012000, 18012000
.   : milestone, 18012000,
profiling (15.204 s) : 15204000, 15204000
.   : milestone, 15204000,
tracing (14.933 s) : 14933000, 14933000
.   : milestone, 14933000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.494 s [15.494 s, 15.494 s] -
appsec 14.608 s [14.608 s, 14.608 s] -886.0 ms (-5.7%)
iast 18.811 s [18.811 s, 18.811 s] 3.317 s (21.4%)
iast_GLOBAL 18.106 s [18.106 s, 18.106 s] 2.612 s (16.9%)
profiling 15.162 s [15.162 s, 15.162 s] -332.0 ms (-2.1%)
tracing 14.833 s [14.833 s, 14.833 s] -661.0 ms (-4.3%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 14.864 s [14.864 s, 14.864 s] -
appsec 14.88 s [14.88 s, 14.88 s] 16.0 ms (0.1%)
iast 18.586 s [18.586 s, 18.586 s] 3.722 s (25.0%)
iast_GLOBAL 18.012 s [18.012 s, 18.012 s] 3.148 s (21.2%)
profiling 15.204 s [15.204 s, 15.204 s] 340.0 ms (2.3%)
tracing 14.933 s [14.933 s, 14.933 s] 69.0 ms (0.5%)

Copy link
Contributor

@PerfectSlayer PerfectSlayer left a comment

Choose a reason for hiding this comment

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

Looking good! 👍
Let's continue in project branch from now on 🤝

private final byte[] contentToInject;
private boolean found = false;
private int matchingPos = 0;
private final Consumer<Void> onContentInjected;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
private final Consumer<Void> onContentInjected;
private final Runnable onContentInjected;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch! I will change it (need to change the test as well)

if (outputStream == null) {
String encoding = getCharacterEncoding();
if (encoding == null) {
encoding = "UTF-8";
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a reason to use UTF-8 as default?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

right. perhaps using the platform default is better

Comment on lines +80 to +82
if (type != null && type.contains("html")) {
shouldInject = true;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm wondering if that simple logic is just enough? Otherwise we can reintroduce it. I've no strong opinions

*
* @return The HTML snippet to inject, {@code null} if RUM injection is disabled to inject.
*/
public static byte[] getSnippet(String encoding) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good to me! 👍

@amarziali amarziali merged commit 486ee57 into project/rum-injection Jul 4, 2025
475 of 504 checks passed
@amarziali amarziali deleted the andrea.marziali/rum branch July 4, 2025 12:47
@PerfectSlayer PerfectSlayer added type: enhancement Enhancements and improvements comp: rum Realtime User Monitoring labels Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: rum Realtime User Monitoring type: enhancement Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants