Skip to content
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

Tibco BW 5: fix child process parentship #7414

Merged
merged 2 commits into from
Sep 4, 2024

Conversation

amarziali
Copy link
Collaborator

What Does This Do

This PR fixes the trace hierarchy of tibco.process spans generated by businessworks 5 applications.

In particular, a couple of situation where badly reported:

  • Subprocesses spawned as Jobs: The process was not linked to the caller ancestor
  • Subprocesses called directly: The process was not reported. The child activities were reported either child of current span context either as a trace root

Motivation

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@amarziali amarziali added type: bug inst: others All other instrumentations labels Aug 12, 2024
@amarziali amarziali requested a review from a team as a code owner August 12, 2024 14:26
@pr-commenter
Copy link

pr-commenter bot commented Aug 12, 2024

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/tibco-bw5-fix
git_commit_date 1724917297 1724926417
git_commit_sha b7907a2 2a8434d
release_version 1.39.0-SNAPSHOT~b7907a264e 1.39.0-SNAPSHOT~2a8434d339
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1724928734 1724928734
ci_job_id 621286083 621286083
ci_pipeline_id 43136693 43136693
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
module Agent Agent
parent None None
variant iast iast

Summary

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

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.39.0-SNAPSHOT~2a8434d339, baseline=1.39.0-SNAPSHOT~b7907a264e

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.05 s) : 0, 1050427
Total [baseline] (10.409 s) : 0, 10409086
Agent [candidate] (1.049 s) : 0, 1048835
Total [candidate] (10.408 s) : 0, 10408299
section appsec
Agent [baseline] (1.171 s) : 0, 1170790
Total [baseline] (10.512 s) : 0, 10512386
Agent [candidate] (1.171 s) : 0, 1171452
Total [candidate] (10.458 s) : 0, 10457984
section iast
Agent [baseline] (1.18 s) : 0, 1180342
Total [baseline] (10.816 s) : 0, 10815959
Agent [candidate] (1.176 s) : 0, 1175963
Total [candidate] (10.848 s) : 0, 10847507
section profiling
Agent [baseline] (1.246 s) : 0, 1246297
Total [baseline] (10.585 s) : 0, 10585011
Agent [candidate] (1.249 s) : 0, 1248549
Total [candidate] (10.586 s) : 0, 10586188
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.05 s -
Agent appsec 1.171 s 120.364 ms (11.5%)
Agent iast 1.18 s 129.915 ms (12.4%)
Agent profiling 1.246 s 195.87 ms (18.6%)
Total tracing 10.409 s -
Total appsec 10.512 s 103.3 ms (1.0%)
Total iast 10.816 s 406.873 ms (3.9%)
Total profiling 10.585 s 175.925 ms (1.7%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.049 s -
Agent appsec 1.171 s 122.616 ms (11.7%)
Agent iast 1.176 s 127.128 ms (12.1%)
Agent profiling 1.249 s 199.713 ms (19.0%)
Total tracing 10.408 s -
Total appsec 10.458 s 49.685 ms (0.5%)
Total iast 10.848 s 439.208 ms (4.2%)
Total profiling 10.586 s 177.889 ms (1.7%)
gantt
    title petclinic - break down per module: candidate=1.39.0-SNAPSHOT~2a8434d339, baseline=1.39.0-SNAPSHOT~b7907a264e

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (670.012 ms) : 0, 670012
BytebuddyAgent [candidate] (669.158 ms) : 0, 669158
GlobalTracer [baseline] (307.241 ms) : 0, 307241
GlobalTracer [candidate] (306.882 ms) : 0, 306882
AppSec [baseline] (51.392 ms) : 0, 51392
AppSec [candidate] (51.117 ms) : 0, 51117
Remote Config [baseline] (669.295 µs) : 0, 669
Remote Config [candidate] (664.491 µs) : 0, 664
Telemetry [baseline] (7.512 ms) : 0, 7512
Telemetry [candidate] (7.426 ms) : 0, 7426
section appsec
BytebuddyAgent [baseline] (678.682 ms) : 0, 678682
BytebuddyAgent [candidate] (678.948 ms) : 0, 678948
GlobalTracer [baseline] (301.225 ms) : 0, 301225
GlobalTracer [candidate] (300.545 ms) : 0, 300545
AppSec [baseline] (160.315 ms) : 0, 160315
AppSec [candidate] (161.145 ms) : 0, 161145
IAST [baseline] (18.527 ms) : 0, 18527
IAST [candidate] (18.375 ms) : 0, 18375
Remote Config [baseline] (638.905 µs) : 0, 639
Remote Config [candidate] (606.96 µs) : 0, 607
Telemetry [baseline] (7.102 ms) : 0, 7102
Telemetry [candidate] (7.439 ms) : 0, 7439
section iast
BytebuddyAgent [baseline] (784.543 ms) : 0, 784543
BytebuddyAgent [candidate] (780.35 ms) : 0, 780350
GlobalTracer [baseline] (298.009 ms) : 0, 298009
GlobalTracer [candidate] (296.963 ms) : 0, 296963
AppSec [baseline] (52.225 ms) : 0, 52225
AppSec [candidate] (49.941 ms) : 0, 49941
IAST [baseline] (22.504 ms) : 0, 22504
IAST [candidate] (24.985 ms) : 0, 24985
Remote Config [baseline] (602.866 µs) : 0, 603
Remote Config [candidate] (592.098 µs) : 0, 592
Telemetry [baseline] (8.738 ms) : 0, 8738
Telemetry [candidate] (9.48 ms) : 0, 9480
section profiling
BytebuddyAgent [baseline] (663.563 ms) : 0, 663563
BytebuddyAgent [candidate] (664.844 ms) : 0, 664844
GlobalTracer [baseline] (389.111 ms) : 0, 389111
GlobalTracer [candidate] (390.076 ms) : 0, 390076
AppSec [baseline] (52.293 ms) : 0, 52293
AppSec [candidate] (52.301 ms) : 0, 52301
Remote Config [baseline] (697.901 µs) : 0, 698
Remote Config [candidate] (689.846 µs) : 0, 690
Telemetry [baseline] (7.324 ms) : 0, 7324
Telemetry [candidate] (7.403 ms) : 0, 7403
ProfilingAgent [baseline] (96.001 ms) : 0, 96001
ProfilingAgent [candidate] (95.771 ms) : 0, 95771
Profiling [baseline] (96.025 ms) : 0, 96025
Profiling [candidate] (95.795 ms) : 0, 95795
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.39.0-SNAPSHOT~2a8434d339, baseline=1.39.0-SNAPSHOT~b7907a264e

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.049 s) : 0, 1049329
Total [baseline] (8.492 s) : 0, 8492048
Agent [candidate] (1.049 s) : 0, 1048690
Total [candidate] (8.47 s) : 0, 8470087
section iast
Agent [baseline] (1.174 s) : 0, 1174443
Total [baseline] (8.965 s) : 0, 8964897
Agent [candidate] (1.184 s) : 0, 1184385
Total [candidate] (9.083 s) : 0, 9082558
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.176 s) : 0, 1175878
Total [baseline] (8.937 s) : 0, 8937313
Agent [candidate] (1.173 s) : 0, 1172651
Total [candidate] (8.932 s) : 0, 8931863
section iast_TELEMETRY_OFF
Agent [baseline] (1.179 s) : 0, 1179188
Total [baseline] (8.948 s) : 0, 8947616
Agent [candidate] (1.173 s) : 0, 1172994
Total [candidate] (8.949 s) : 0, 8948911
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.049 s -
Agent iast 1.174 s 125.114 ms (11.9%)
Agent iast_HARDCODED_SECRET_DISABLED 1.176 s 126.549 ms (12.1%)
Agent iast_TELEMETRY_OFF 1.179 s 129.859 ms (12.4%)
Total tracing 8.492 s -
Total iast 8.965 s 472.849 ms (5.6%)
Total iast_HARDCODED_SECRET_DISABLED 8.937 s 445.265 ms (5.2%)
Total iast_TELEMETRY_OFF 8.948 s 455.568 ms (5.4%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.049 s -
Agent iast 1.184 s 135.695 ms (12.9%)
Agent iast_HARDCODED_SECRET_DISABLED 1.173 s 123.961 ms (11.8%)
Agent iast_TELEMETRY_OFF 1.173 s 124.304 ms (11.9%)
Total tracing 8.47 s -
Total iast 9.083 s 612.471 ms (7.2%)
Total iast_HARDCODED_SECRET_DISABLED 8.932 s 461.776 ms (5.5%)
Total iast_TELEMETRY_OFF 8.949 s 478.825 ms (5.7%)
gantt
    title insecure-bank - break down per module: candidate=1.39.0-SNAPSHOT~2a8434d339, baseline=1.39.0-SNAPSHOT~b7907a264e

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (669.448 ms) : 0, 669448
BytebuddyAgent [candidate] (668.938 ms) : 0, 668938
GlobalTracer [baseline] (306.711 ms) : 0, 306711
GlobalTracer [candidate] (306.77 ms) : 0, 306770
AppSec [baseline] (51.456 ms) : 0, 51456
AppSec [candidate] (51.211 ms) : 0, 51211
Remote Config [baseline] (677.131 µs) : 0, 677
Remote Config [candidate] (665.316 µs) : 0, 665
Telemetry [baseline] (7.457 ms) : 0, 7457
Telemetry [candidate] (7.44 ms) : 0, 7440
section iast
BytebuddyAgent [baseline] (779.07 ms) : 0, 779070
BytebuddyAgent [candidate] (785.745 ms) : 0, 785745
GlobalTracer [baseline] (296.909 ms) : 0, 296909
GlobalTracer [candidate] (298.722 ms) : 0, 298722
AppSec [baseline] (48.972 ms) : 0, 48972
AppSec [candidate] (50.975 ms) : 0, 50975
IAST [baseline] (25.845 ms) : 0, 25845
IAST [candidate] (24.829 ms) : 0, 24829
Remote Config [baseline] (597.236 µs) : 0, 597
Remote Config [candidate] (622.09 µs) : 0, 622
Telemetry [baseline] (9.453 ms) : 0, 9453
Telemetry [candidate] (9.736 ms) : 0, 9736
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (780.317 ms) : 0, 780317
BytebuddyAgent [candidate] (777.748 ms) : 0, 777748
GlobalTracer [baseline] (297.109 ms) : 0, 297109
GlobalTracer [candidate] (296.847 ms) : 0, 296847
AppSec [baseline] (50.561 ms) : 0, 50561
AppSec [candidate] (51.103 ms) : 0, 51103
IAST [baseline] (24.874 ms) : 0, 24874
IAST [candidate] (25.55 ms) : 0, 25550
Remote Config [baseline] (586.174 µs) : 0, 586
Remote Config [candidate] (582.861 µs) : 0, 583
Telemetry [baseline] (8.802 ms) : 0, 8802
Telemetry [candidate] (7.171 ms) : 0, 7171
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (782.915 ms) : 0, 782915
BytebuddyAgent [candidate] (777.432 ms) : 0, 777432
GlobalTracer [baseline] (298.089 ms) : 0, 298089
GlobalTracer [candidate] (297.281 ms) : 0, 297281
AppSec [baseline] (50.707 ms) : 0, 50707
AppSec [candidate] (50.673 ms) : 0, 50673
IAST [baseline] (23.898 ms) : 0, 23898
IAST [candidate] (24.768 ms) : 0, 24768
Remote Config [baseline] (589.511 µs) : 0, 590
Remote Config [candidate] (593.553 µs) : 0, 594
Telemetry [baseline] (9.34 ms) : 0, 9340
Telemetry [candidate] (8.565 ms) : 0, 8565
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-08-29T10:22:58 2024-08-29T10:29:46
git_branch master andrea.marziali/tibco-bw5-fix
git_commit_date 1724917297 1724926417
git_commit_sha b7907a2 2a8434d
release_version 1.39.0-SNAPSHOT~b7907a264e 1.39.0-SNAPSHOT~2a8434d339
start_time 2024-08-29T10:22:44 2024-08-29T10:29:33
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1724927730 1724927730
ci_job_id 621286084 621286084
ci_pipeline_id 43136693 43136693
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant iast iast

Summary

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

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.39.0-SNAPSHOT~2a8434d339, baseline=1.39.0-SNAPSHOT~b7907a264e
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.337 ms) : 1316, 1357
.   : milestone, 1337,
appsec (1.744 ms) : 1721, 1766
.   : milestone, 1744,
appsec_no_iast (1.732 ms) : 1708, 1756
.   : milestone, 1732,
iast (1.484 ms) : 1462, 1507
.   : milestone, 1484,
profiling (1.46 ms) : 1437, 1483
.   : milestone, 1460,
tracing (1.466 ms) : 1441, 1491
.   : milestone, 1466,
section candidate
no_agent (1.345 ms) : 1325, 1364
.   : milestone, 1345,
appsec (1.71 ms) : 1687, 1733
.   : milestone, 1710,
appsec_no_iast (1.717 ms) : 1692, 1741
.   : milestone, 1717,
iast (1.471 ms) : 1448, 1494
.   : milestone, 1471,
profiling (1.468 ms) : 1444, 1491
.   : milestone, 1468,
tracing (1.48 ms) : 1456, 1504
.   : milestone, 1480,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.337 ms [1.316 ms, 1.357 ms] -
appsec 1.744 ms [1.721 ms, 1.766 ms] 406.706 µs (30.4%)
appsec_no_iast 1.732 ms [1.708 ms, 1.756 ms] 395.407 µs (29.6%)
iast 1.484 ms [1.462 ms, 1.507 ms] 147.62 µs (11.0%)
profiling 1.46 ms [1.437 ms, 1.483 ms] 123.189 µs (9.2%)
tracing 1.466 ms [1.441 ms, 1.491 ms] 128.85 µs (9.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.345 ms [1.325 ms, 1.364 ms] -
appsec 1.71 ms [1.687 ms, 1.733 ms] 365.254 µs (27.2%)
appsec_no_iast 1.717 ms [1.692 ms, 1.741 ms] 372.047 µs (27.7%)
iast 1.471 ms [1.448 ms, 1.494 ms] 126.137 µs (9.4%)
profiling 1.468 ms [1.444 ms, 1.491 ms] 122.667 µs (9.1%)
tracing 1.48 ms [1.456 ms, 1.504 ms] 135.437 µs (10.1%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.39.0-SNAPSHOT~2a8434d339, baseline=1.39.0-SNAPSHOT~b7907a264e
    dateFormat X
    axisFormat %s
section baseline
no_agent (368.924 µs) : 350, 388
.   : milestone, 369,
iast (479.436 µs) : 457, 502
.   : milestone, 479,
iast_FULL (545.704 µs) : 525, 567
.   : milestone, 546,
iast_GLOBAL (505.532 µs) : 485, 526
.   : milestone, 506,
iast_HARDCODED_SECRET_DISABLED (477.767 µs) : 455, 500
.   : milestone, 478,
iast_INACTIVE (444.736 µs) : 424, 465
.   : milestone, 445,
iast_TELEMETRY_OFF (470.88 µs) : 448, 493
.   : milestone, 471,
tracing (437.565 µs) : 417, 458
.   : milestone, 438,
section candidate
no_agent (360.497 µs) : 340, 381
.   : milestone, 360,
iast (478.908 µs) : 456, 502
.   : milestone, 479,
iast_FULL (550.145 µs) : 529, 571
.   : milestone, 550,
iast_GLOBAL (505.376 µs) : 484, 527
.   : milestone, 505,
iast_HARDCODED_SECRET_DISABLED (487.184 µs) : 465, 509
.   : milestone, 487,
iast_INACTIVE (442.445 µs) : 422, 463
.   : milestone, 442,
iast_TELEMETRY_OFF (468.838 µs) : 446, 491
.   : milestone, 469,
tracing (439.357 µs) : 419, 460
.   : milestone, 439,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 368.924 µs [349.706 µs, 388.141 µs] -
iast 479.436 µs [457.114 µs, 501.758 µs] 110.512 µs (30.0%)
iast_FULL 545.704 µs [524.7 µs, 566.708 µs] 176.78 µs (47.9%)
iast_GLOBAL 505.532 µs [484.67 µs, 526.393 µs] 136.608 µs (37.0%)
iast_HARDCODED_SECRET_DISABLED 477.767 µs [455.456 µs, 500.079 µs] 108.843 µs (29.5%)
iast_INACTIVE 444.736 µs [424.038 µs, 465.434 µs] 75.812 µs (20.5%)
iast_TELEMETRY_OFF 470.88 µs [448.314 µs, 493.447 µs] 101.956 µs (27.6%)
tracing 437.565 µs [417.085 µs, 458.045 µs] 68.641 µs (18.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 360.497 µs [340.275 µs, 380.718 µs] -
iast 478.908 µs [456.221 µs, 501.594 µs] 118.411 µs (32.8%)
iast_FULL 550.145 µs [529.076 µs, 571.214 µs] 189.648 µs (52.6%)
iast_GLOBAL 505.376 µs [483.73 µs, 527.022 µs] 144.88 µs (40.2%)
iast_HARDCODED_SECRET_DISABLED 487.184 µs [465.049 µs, 509.32 µs] 126.687 µs (35.1%)
iast_INACTIVE 442.445 µs [422.008 µs, 462.881 µs] 81.948 µs (22.7%)
iast_TELEMETRY_OFF 468.838 µs [446.494 µs, 491.181 µs] 108.341 µs (30.1%)
tracing 439.357 µs [418.994 µs, 459.72 µs] 78.861 µs (21.9%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master andrea.marziali/tibco-bw5-fix
git_commit_date 1724917297 1724926417
git_commit_sha b7907a2 2a8434d
release_version 1.39.0-SNAPSHOT~b7907a264e 1.39.0-SNAPSHOT~2a8434d339
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1724928234 1724928234
ci_job_id 621286085 621286085
ci_pipeline_id 43136693 43136693
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
variant appsec appsec

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.39.0-SNAPSHOT~2a8434d339, baseline=1.39.0-SNAPSHOT~b7907a264e
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.456 ms) : 1445, 1467
.   : milestone, 1456,
appsec (2.229 ms) : 2193, 2264
.   : milestone, 2229,
iast (1.975 ms) : 1932, 2017
.   : milestone, 1975,
iast_GLOBAL (2.01 ms) : 1966, 2053
.   : milestone, 2010,
profiling (1.846 ms) : 1812, 1880
.   : milestone, 1846,
tracing (1.842 ms) : 1809, 1875
.   : milestone, 1842,
section candidate
no_agent (1.452 ms) : 1441, 1463
.   : milestone, 1452,
appsec (2.219 ms) : 2184, 2254
.   : milestone, 2219,
iast (1.98 ms) : 1937, 2024
.   : milestone, 1980,
iast_GLOBAL (2.012 ms) : 1968, 2055
.   : milestone, 2012,
profiling (1.855 ms) : 1821, 1889
.   : milestone, 1855,
tracing (1.836 ms) : 1803, 1868
.   : milestone, 1836,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.456 ms [1.445 ms, 1.467 ms] -
appsec 2.229 ms [2.193 ms, 2.264 ms] 772.827 µs (53.1%)
iast 1.975 ms [1.932 ms, 2.017 ms] 518.803 µs (35.6%)
iast_GLOBAL 2.01 ms [1.966 ms, 2.053 ms] 553.766 µs (38.0%)
profiling 1.846 ms [1.812 ms, 1.88 ms] 390.21 µs (26.8%)
tracing 1.842 ms [1.809 ms, 1.875 ms] 385.851 µs (26.5%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.452 ms [1.441 ms, 1.463 ms] -
appsec 2.219 ms [2.184 ms, 2.254 ms] 767.004 µs (52.8%)
iast 1.98 ms [1.937 ms, 2.024 ms] 528.274 µs (36.4%)
iast_GLOBAL 2.012 ms [1.968 ms, 2.055 ms] 559.588 µs (38.5%)
profiling 1.855 ms [1.821 ms, 1.889 ms] 402.783 µs (27.7%)
tracing 1.836 ms [1.803 ms, 1.868 ms] 383.642 µs (26.4%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.39.0-SNAPSHOT~2a8434d339, baseline=1.39.0-SNAPSHOT~b7907a264e
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.33 s) : 15330000, 15330000
.   : milestone, 15330000,
appsec (15.123 s) : 15123000, 15123000
.   : milestone, 15123000,
iast (19.144 s) : 19144000, 19144000
.   : milestone, 19144000,
iast_GLOBAL (17.872 s) : 17872000, 17872000
.   : milestone, 17872000,
profiling (15.372 s) : 15372000, 15372000
.   : milestone, 15372000,
tracing (15.006 s) : 15006000, 15006000
.   : milestone, 15006000,
section candidate
no_agent (15.396 s) : 15396000, 15396000
.   : milestone, 15396000,
appsec (14.972 s) : 14972000, 14972000
.   : milestone, 14972000,
iast (18.94 s) : 18940000, 18940000
.   : milestone, 18940000,
iast_GLOBAL (17.869 s) : 17869000, 17869000
.   : milestone, 17869000,
profiling (15.079 s) : 15079000, 15079000
.   : milestone, 15079000,
tracing (14.842 s) : 14842000, 14842000
.   : milestone, 14842000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.33 s [15.33 s, 15.33 s] -
appsec 15.123 s [15.123 s, 15.123 s] -207.0 ms (-1.4%)
iast 19.144 s [19.144 s, 19.144 s] 3.814 s (24.9%)
iast_GLOBAL 17.872 s [17.872 s, 17.872 s] 2.542 s (16.6%)
profiling 15.372 s [15.372 s, 15.372 s] 42.0 ms (0.3%)
tracing 15.006 s [15.006 s, 15.006 s] -324.0 ms (-2.1%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.396 s [15.396 s, 15.396 s] -
appsec 14.972 s [14.972 s, 14.972 s] -424.0 ms (-2.8%)
iast 18.94 s [18.94 s, 18.94 s] 3.544 s (23.0%)
iast_GLOBAL 17.869 s [17.869 s, 17.869 s] 2.473 s (16.1%)
profiling 15.079 s [15.079 s, 15.079 s] -317.0 ms (-2.1%)
tracing 14.842 s [14.842 s, 14.842 s] -554.0 ms (-3.6%)

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.

Looks good.
A quick comment about a collection as I am not well versed in the framework (and possible workflow cardinality).

DECORATE.onProcessStart(span, workflowName);
Map<String, AgentSpan> map =
InstrumentationContext.get(ProcessContext.class, Map.class)
.putIfAbsent(processContext, HashMap::new);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have a bounded map implementation?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I don't think we can in this case because this map will contain the correspondence between an activity and a span (during the span lifetime). If I miss inserting things I will miss which span I should activate or use as parent.
However those activities are a finite (small) numbers since they represent the thing to do during a business process. I have no clues also about a right sizing of this map so I used a default one

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, typically, we'd still want a bounded map in these cases. Otherwise, we can end up consuming a lot of memory and causing the JVM to GC a lot or even bring down the JVM.

While we might lose some tracing, bringing down the application is worse.

That said, I do appreciate the difficulty in sizing especially in this case.
I think what we need to do is create a BoundedMap that we can use in instrumentation that also reports metrics on capacity, so we can size better in the future.

Although to be clear, I'm not saying that we should do that right now for this PR.

@amarziali amarziali merged commit 0aa32f5 into master Sep 4, 2024
90 checks passed
@amarziali amarziali deleted the andrea.marziali/tibco-bw5-fix branch September 4, 2024 09:26
@github-actions github-actions bot added this to the 1.40.0 milestone Sep 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inst: others All other instrumentations type: bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants