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

Add Hikari Pool Name tag #7672

Merged
merged 19 commits into from
Oct 16, 2024
Merged

Add Hikari Pool Name tag #7672

merged 19 commits into from
Oct 16, 2024

Conversation

jordan-wong
Copy link
Contributor

@jordan-wong jordan-wong commented Sep 23, 2024

What Does This Do

Adds instrumentation for Hikari Pool Name. If using a Hikari pool, adds a db.pool.name tag to span.

Motivation

Helps with issue: #7152

Additional Notes

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@jordan-wong jordan-wong requested a review from a team as a code owner September 23, 2024 14:41
@pr-commenter
Copy link

pr-commenter bot commented Sep 23, 2024

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master add-hikari-poolname-tag
git_commit_date 1728980020 1729002031
git_commit_sha d6c734c 08ce028
release_version 1.41.0-SNAPSHOT~d6c734ceba 1.41.0-SNAPSHOT~08ce028e57
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1729004662 1729004662
ci_job_id 672626318 672626318
ci_pipeline_id 46625180 46625180
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 55 metrics, 8 unstable metrics.

Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.41.0-SNAPSHOT~08ce028e57, baseline=1.41.0-SNAPSHOT~d6c734ceba

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.067 s) : 0, 1066657
Total [baseline] (8.546 s) : 0, 8545532
Agent [candidate] (1.075 s) : 0, 1075007
Total [candidate] (8.55 s) : 0, 8550494
section iast
Agent [baseline] (1.196 s) : 0, 1196096
Total [baseline] (9.06 s) : 0, 9059685
Agent [candidate] (1.204 s) : 0, 1204008
Total [candidate] (9.084 s) : 0, 9083858
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.194 s) : 0, 1194189
Total [baseline] (9.074 s) : 0, 9073855
Agent [candidate] (1.197 s) : 0, 1197268
Total [candidate] (9.093 s) : 0, 9092608
section iast_TELEMETRY_OFF
Agent [baseline] (1.191 s) : 0, 1190898
Total [baseline] (9.061 s) : 0, 9060694
Agent [candidate] (1.199 s) : 0, 1198653
Total [candidate] (9.066 s) : 0, 9065901
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.067 s -
Agent iast 1.196 s 129.439 ms (12.1%)
Agent iast_HARDCODED_SECRET_DISABLED 1.194 s 127.532 ms (12.0%)
Agent iast_TELEMETRY_OFF 1.191 s 124.242 ms (11.6%)
Total tracing 8.546 s -
Total iast 9.06 s 514.153 ms (6.0%)
Total iast_HARDCODED_SECRET_DISABLED 9.074 s 528.323 ms (6.2%)
Total iast_TELEMETRY_OFF 9.061 s 515.162 ms (6.0%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.075 s -
Agent iast 1.204 s 129.0 ms (12.0%)
Agent iast_HARDCODED_SECRET_DISABLED 1.197 s 122.261 ms (11.4%)
Agent iast_TELEMETRY_OFF 1.199 s 123.646 ms (11.5%)
Total tracing 8.55 s -
Total iast 9.084 s 533.364 ms (6.2%)
Total iast_HARDCODED_SECRET_DISABLED 9.093 s 542.114 ms (6.3%)
Total iast_TELEMETRY_OFF 9.066 s 515.407 ms (6.0%)
gantt
    title insecure-bank - break down per module: candidate=1.41.0-SNAPSHOT~08ce028e57, baseline=1.41.0-SNAPSHOT~d6c734ceba

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (681.339 ms) : 0, 681339
BytebuddyAgent [candidate] (686.668 ms) : 0, 686668
GlobalTracer [baseline] (309.765 ms) : 0, 309765
GlobalTracer [candidate] (312.197 ms) : 0, 312197
AppSec [baseline] (53.815 ms) : 0, 53815
AppSec [candidate] (54.199 ms) : 0, 54199
Remote Config [baseline] (656.017 µs) : 0, 656
Remote Config [candidate] (665.657 µs) : 0, 666
Telemetry [baseline] (7.476 ms) : 0, 7476
Telemetry [candidate] (7.544 ms) : 0, 7544
section iast
BytebuddyAgent [baseline] (797.384 ms) : 0, 797384
BytebuddyAgent [candidate] (803.608 ms) : 0, 803608
GlobalTracer [baseline] (299.127 ms) : 0, 299127
GlobalTracer [candidate] (300.521 ms) : 0, 300521
AppSec [baseline] (55.304 ms) : 0, 55304
AppSec [candidate] (57.163 ms) : 0, 57163
IAST [baseline] (22.957 ms) : 0, 22957
IAST [candidate] (21.256 ms) : 0, 21256
Remote Config [baseline] (603.682 µs) : 0, 604
Remote Config [candidate] (601.335 µs) : 0, 601
Telemetry [baseline] (7.029 ms) : 0, 7029
Telemetry [candidate] (7.088 ms) : 0, 7088
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (795.953 ms) : 0, 795953
BytebuddyAgent [candidate] (797.885 ms) : 0, 797885
GlobalTracer [baseline] (298.412 ms) : 0, 298412
GlobalTracer [candidate] (299.472 ms) : 0, 299472
AppSec [baseline] (56.951 ms) : 0, 56951
AppSec [candidate] (53.528 ms) : 0, 53528
IAST [baseline] (21.422 ms) : 0, 21422
IAST [candidate] (25.051 ms) : 0, 25051
Remote Config [baseline] (618.9 µs) : 0, 619
Remote Config [candidate] (604.393 µs) : 0, 604
Telemetry [baseline] (7.196 ms) : 0, 7196
Telemetry [candidate] (7.015 ms) : 0, 7015
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (793.361 ms) : 0, 793361
BytebuddyAgent [candidate] (798.688 ms) : 0, 798688
GlobalTracer [baseline] (298.466 ms) : 0, 298466
GlobalTracer [candidate] (300.458 ms) : 0, 300458
AppSec [baseline] (54.582 ms) : 0, 54582
AppSec [candidate] (55.475 ms) : 0, 55475
IAST [baseline] (23.315 ms) : 0, 23315
IAST [candidate] (22.647 ms) : 0, 22647
Remote Config [baseline] (626.846 µs) : 0, 627
Remote Config [candidate] (613.744 µs) : 0, 614
Telemetry [baseline] (6.903 ms) : 0, 6903
Telemetry [candidate] (7.016 ms) : 0, 7016
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.41.0-SNAPSHOT~08ce028e57, baseline=1.41.0-SNAPSHOT~d6c734ceba

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.063 s) : 0, 1063458
Total [baseline] (10.382 s) : 0, 10382256
Agent [candidate] (1.067 s) : 0, 1066628
Total [candidate] (10.402 s) : 0, 10402279
section appsec
Agent [baseline] (1.199 s) : 0, 1198787
Total [baseline] (10.563 s) : 0, 10563111
Agent [candidate] (1.203 s) : 0, 1202546
Total [candidate] (10.58 s) : 0, 10580211
section iast
Agent [baseline] (1.194 s) : 0, 1194091
Total [baseline] (10.858 s) : 0, 10857630
Agent [candidate] (1.196 s) : 0, 1196236
Total [candidate] (10.808 s) : 0, 10808186
section profiling
Agent [baseline] (1.262 s) : 0, 1262461
Total [baseline] (10.579 s) : 0, 10578987
Agent [candidate] (1.267 s) : 0, 1266558
Total [candidate] (10.592 s) : 0, 10592276
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.063 s -
Agent appsec 1.199 s 135.329 ms (12.7%)
Agent iast 1.194 s 130.633 ms (12.3%)
Agent profiling 1.262 s 199.003 ms (18.7%)
Total tracing 10.382 s -
Total appsec 10.563 s 180.855 ms (1.7%)
Total iast 10.858 s 475.374 ms (4.6%)
Total profiling 10.579 s 196.731 ms (1.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.067 s -
Agent appsec 1.203 s 135.919 ms (12.7%)
Agent iast 1.196 s 129.609 ms (12.2%)
Agent profiling 1.267 s 199.931 ms (18.7%)
Total tracing 10.402 s -
Total appsec 10.58 s 177.932 ms (1.7%)
Total iast 10.808 s 405.908 ms (3.9%)
Total profiling 10.592 s 189.997 ms (1.8%)
gantt
    title petclinic - break down per module: candidate=1.41.0-SNAPSHOT~08ce028e57, baseline=1.41.0-SNAPSHOT~d6c734ceba

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (679.205 ms) : 0, 679205
BytebuddyAgent [candidate] (681.089 ms) : 0, 681089
GlobalTracer [baseline] (308.799 ms) : 0, 308799
GlobalTracer [candidate] (310.039 ms) : 0, 310039
AppSec [baseline] (53.727 ms) : 0, 53727
AppSec [candidate] (53.701 ms) : 0, 53701
Remote Config [baseline] (660.866 µs) : 0, 661
Remote Config [candidate] (670.903 µs) : 0, 671
Telemetry [baseline] (7.488 ms) : 0, 7488
Telemetry [candidate] (7.513 ms) : 0, 7513
section appsec
BytebuddyAgent [baseline] (697.245 ms) : 0, 697245
BytebuddyAgent [candidate] (698.427 ms) : 0, 698427
GlobalTracer [baseline] (305.99 ms) : 0, 305990
GlobalTracer [candidate] (307.638 ms) : 0, 307638
AppSec [baseline] (161.816 ms) : 0, 161816
AppSec [candidate] (162.576 ms) : 0, 162576
Remote Config [baseline] (641.899 µs) : 0, 642
Remote Config [candidate] (631.989 µs) : 0, 632
Telemetry [baseline] (9.492 ms) : 0, 9492
Telemetry [candidate] (9.93 ms) : 0, 9930
IAST [baseline] (20.011 ms) : 0, 20011
IAST [candidate] (19.432 ms) : 0, 19432
section iast
BytebuddyAgent [baseline] (796.196 ms) : 0, 796196
BytebuddyAgent [candidate] (797.423 ms) : 0, 797423
GlobalTracer [baseline] (298.347 ms) : 0, 298347
GlobalTracer [candidate] (299.082 ms) : 0, 299082
AppSec [baseline] (55.534 ms) : 0, 55534
AppSec [candidate] (52.041 ms) : 0, 52041
Remote Config [baseline] (600.573 µs) : 0, 601
Remote Config [candidate] (593.89 µs) : 0, 594
Telemetry [baseline] (7.025 ms) : 0, 7025
Telemetry [candidate] (6.938 ms) : 0, 6938
IAST [baseline] (22.747 ms) : 0, 22747
IAST [candidate] (26.51 ms) : 0, 26510
section profiling
ProfilingAgent [baseline] (95.486 ms) : 0, 95486
ProfilingAgent [candidate] (96.781 ms) : 0, 96781
BytebuddyAgent [baseline] (674.298 ms) : 0, 674298
BytebuddyAgent [candidate] (675.491 ms) : 0, 675491
GlobalTracer [baseline] (391.836 ms) : 0, 391836
GlobalTracer [candidate] (393.169 ms) : 0, 393169
AppSec [baseline] (54.4 ms) : 0, 54400
AppSec [candidate] (54.428 ms) : 0, 54428
Remote Config [baseline] (650.649 µs) : 0, 651
Remote Config [candidate] (649.339 µs) : 0, 649
Telemetry [baseline] (7.367 ms) : 0, 7367
Telemetry [candidate] (7.421 ms) : 0, 7421
Profiling [baseline] (95.51 ms) : 0, 95510
Profiling [candidate] (96.805 ms) : 0, 96805
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-10-15T14:34:47 2024-10-15T14:41:40
git_branch master add-hikari-poolname-tag
git_commit_date 1728980020 1729002031
git_commit_sha d6c734c 08ce028
release_version 1.41.0-SNAPSHOT~d6c734ceba 1.41.0-SNAPSHOT~08ce028e57
start_time 2024-10-15T14:34:34 2024-10-15T14:41:27
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1729003648 1729003648
ci_job_id 672626319 672626319
ci_pipeline_id 46625180 46625180
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 12 metrics, 16 unstable metrics.

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.41.0-SNAPSHOT~08ce028e57, baseline=1.41.0-SNAPSHOT~d6c734ceba
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.347 ms) : 1327, 1366
.   : milestone, 1347,
appsec (1.728 ms) : 1705, 1750
.   : milestone, 1728,
appsec_no_iast (1.721 ms) : 1697, 1746
.   : milestone, 1721,
iast (1.489 ms) : 1466, 1512
.   : milestone, 1489,
profiling (1.494 ms) : 1469, 1518
.   : milestone, 1494,
tracing (1.462 ms) : 1438, 1487
.   : milestone, 1462,
section candidate
no_agent (1.351 ms) : 1332, 1370
.   : milestone, 1351,
appsec (1.738 ms) : 1714, 1761
.   : milestone, 1738,
appsec_no_iast (1.722 ms) : 1697, 1747
.   : milestone, 1722,
iast (1.472 ms) : 1448, 1495
.   : milestone, 1472,
profiling (1.492 ms) : 1470, 1515
.   : milestone, 1492,
tracing (1.49 ms) : 1466, 1514
.   : milestone, 1490,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.347 ms [1.327 ms, 1.366 ms] -
appsec 1.728 ms [1.705 ms, 1.75 ms] 381.096 µs (28.3%)
appsec_no_iast 1.721 ms [1.697 ms, 1.746 ms] 374.868 µs (27.8%)
iast 1.489 ms [1.466 ms, 1.512 ms] 142.433 µs (10.6%)
profiling 1.494 ms [1.469 ms, 1.518 ms] 147.089 µs (10.9%)
tracing 1.462 ms [1.438 ms, 1.487 ms] 115.924 µs (8.6%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.351 ms [1.332 ms, 1.37 ms] -
appsec 1.738 ms [1.714 ms, 1.761 ms] 386.587 µs (28.6%)
appsec_no_iast 1.722 ms [1.697 ms, 1.747 ms] 370.68 µs (27.4%)
iast 1.472 ms [1.448 ms, 1.495 ms] 120.666 µs (8.9%)
profiling 1.492 ms [1.47 ms, 1.515 ms] 141.519 µs (10.5%)
tracing 1.49 ms [1.466 ms, 1.514 ms] 138.946 µs (10.3%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.41.0-SNAPSHOT~08ce028e57, baseline=1.41.0-SNAPSHOT~d6c734ceba
    dateFormat X
    axisFormat %s
section baseline
no_agent (378.075 µs) : 358, 398
.   : milestone, 378,
iast (491.855 µs) : 470, 513
.   : milestone, 492,
iast_FULL (563.493 µs) : 542, 585
.   : milestone, 563,
iast_GLOBAL (515.878 µs) : 493, 538
.   : milestone, 516,
iast_HARDCODED_SECRET_DISABLED (495.573 µs) : 474, 517
.   : milestone, 496,
iast_INACTIVE (453.695 µs) : 433, 475
.   : milestone, 454,
iast_TELEMETRY_OFF (484.557 µs) : 463, 506
.   : milestone, 485,
tracing (450.899 µs) : 430, 472
.   : milestone, 451,
section candidate
no_agent (378.786 µs) : 359, 398
.   : milestone, 379,
iast (484.395 µs) : 463, 506
.   : milestone, 484,
iast_FULL (556.743 µs) : 535, 578
.   : milestone, 557,
iast_GLOBAL (506.342 µs) : 485, 527
.   : milestone, 506,
iast_HARDCODED_SECRET_DISABLED (491.812 µs) : 470, 514
.   : milestone, 492,
iast_INACTIVE (454.183 µs) : 433, 476
.   : milestone, 454,
iast_TELEMETRY_OFF (475.971 µs) : 455, 497
.   : milestone, 476,
tracing (446.713 µs) : 426, 467
.   : milestone, 447,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 378.075 µs [358.051 µs, 398.098 µs] -
iast 491.855 µs [470.499 µs, 513.212 µs] 113.781 µs (30.1%)
iast_FULL 563.493 µs [542.378 µs, 584.607 µs] 185.418 µs (49.0%)
iast_GLOBAL 515.878 µs [493.397 µs, 538.359 µs] 137.803 µs (36.4%)
iast_HARDCODED_SECRET_DISABLED 495.573 µs [473.882 µs, 517.265 µs] 117.499 µs (31.1%)
iast_INACTIVE 453.695 µs [432.877 µs, 474.513 µs] 75.62 µs (20.0%)
iast_TELEMETRY_OFF 484.557 µs [462.725 µs, 506.388 µs] 106.482 µs (28.2%)
tracing 450.899 µs [429.863 µs, 471.936 µs] 72.825 µs (19.3%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 378.786 µs [359.222 µs, 398.351 µs] -
iast 484.395 µs [463.15 µs, 505.639 µs] 105.609 µs (27.9%)
iast_FULL 556.743 µs [535.113 µs, 578.373 µs] 177.956 µs (47.0%)
iast_GLOBAL 506.342 µs [485.227 µs, 527.458 µs] 127.556 µs (33.7%)
iast_HARDCODED_SECRET_DISABLED 491.812 µs [469.946 µs, 513.679 µs] 113.026 µs (29.8%)
iast_INACTIVE 454.183 µs [432.621 µs, 475.745 µs] 75.396 µs (19.9%)
iast_TELEMETRY_OFF 475.971 µs [455.042 µs, 496.899 µs] 97.184 µs (25.7%)
tracing 446.713 µs [426.067 µs, 467.359 µs] 67.927 µs (17.9%)

Dacapo

@jordan-wong
Copy link
Contributor Author

jordan-wong commented Sep 23, 2024

mistake ping, messed up rebase 😅

@pr-commenter
Copy link

pr-commenter bot commented Sep 23, 2024

Debugger benchmarks

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
ci_job_date 1728669851 1728670227
end_time 2024-10-11T18:05:27 2024-10-11T18:11:41
git_branch master add-hikari-poolname-tag
git_commit_sha b69d348 bb275ac
start_time 2024-10-11T18:04:12 2024-10-11T18:10:28
See matching parameters
Baseline Candidate
ci_job_id 670232794 670232794
ci_pipeline_id 46415314 46415314
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
git_commit_date 1728669128 1728669128

Summary

Found 0 performance improvements and 5 performance regressions! Performance is the same for 0 metrics, 10 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:loop worse
[+596.162µs; +628.455µs] or [+5.862%; +6.179%]
worse
[+537.764µs; +656.783µs] or [+5.191%; +6.340%]
worse
[+491.820µs; +656.460µs] or [+4.706%; +6.281%]
worse
[+370.403µs; +793.696µs] or [+3.428%; +7.345%]
worse
[-6.615op/s; -3.681op/s] or [-6.946%; -3.865%]
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:noprobe unstable
[-84.257µs; +35.898µs] or [-29.320%; +12.492%]
unstable
[-99.129µs; +45.398µs] or [-30.068%; +13.770%]
unstable
[-150.330µs; +67.578µs] or [-41.743%; +18.765%]
unstable
[-1237.576µs; +427.007µs] or [-121.790%; +42.022%]
unstable
[-62.278op/s; +204.525op/s] or [-2.367%; +7.772%]
scenario:basic unstable
[-21.282µs; +9.321µs] or [-7.779%; +3.407%]
unstable
[-38.136µs; +16.598µs] or [-12.343%; +5.372%]
unstable
[-44.618µs; +21.485µs] or [-13.890%; +6.689%]
unstable
[-939.063µs; +331.005µs] or [-111.199%; +39.196%]
unstable
[-235.047op/s; +235.047op/s] or [-9.167%; +9.167%]
Request duration reports for reports
gantt
    title reports - request duration [CI 0.99] : candidate=None, baseline=None
    dateFormat X
    axisFormat %s
section baseline
noprobe (329.678 µs) : 242, 417
.   : milestone, 330,
basic (308.972 µs) : 272, 346
.   : milestone, 309,
loop (10.359 ms) : 10286, 10431
.   : milestone, 10359,
section candidate
noprobe (302.813 µs) : 260, 345
.   : milestone, 303,
basic (298.203 µs) : 289, 307
.   : milestone, 298,
loop (10.956 ms) : 10927, 10985
.   : milestone, 10956,
Loading
  • baseline results
Scenario Request median duration [CI 0.99]
noprobe 329.678 µs [241.964 µs, 417.392 µs]
basic 308.972 µs [272.164 µs, 345.78 µs]
loop 10.359 ms [10.286 ms, 10.431 ms]
  • candidate results
Scenario Request median duration [CI 0.99]
noprobe 302.813 µs [260.333 µs, 345.292 µs]
basic 298.203 µs [289.332 µs, 307.075 µs]
loop 10.956 ms [10.927 ms, 10.985 ms]

@pr-commenter
Copy link

pr-commenter bot commented Sep 23, 2024

Kafka / producer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master add-hikari-poolname-tag
git_commit_date 1726677448 1727113787
git_commit_sha da9ecfb ba817d5
See matching parameters
Baseline Candidate
ci_job_date 1727118215 1727118215
ci_job_id 648719058 648719058
ci_pipeline_id 44944727 44944727
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
jdkVersion 11.0.21 11.0.21
jmhVersion 1.36 1.36
jvm /usr/lib/jvm/java-11-openjdk-amd64/bin/java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
jvmArgs -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/producer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/producer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant
vmName OpenJDK 64-Bit Server VM OpenJDK 64-Bit Server VM
vmVersion 11.0.21+9-post-Ubuntu-0ubuntu122.04 11.0.21+9-post-Ubuntu-0ubuntu122.04

Summary

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

See unchanged results
scenario Δ mean throughput
scenario:not-instrumented/KafkaProduceBenchmark.benchProduce same
scenario:only-tracing-dsm-disabled-benchmarks/KafkaProduceBenchmark.benchProduce same
scenario:only-tracing-dsm-enabled-benchmarks/KafkaProduceBenchmark.benchProduce same

@pr-commenter
Copy link

pr-commenter bot commented Sep 23, 2024

Kafka / consumer-benchmark

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master add-hikari-poolname-tag
git_commit_date 1726677448 1727113787
git_commit_sha da9ecfb ba817d5
See matching parameters
Baseline Candidate
ci_job_date 1727118256 1727118256
ci_job_id 648719059 648719059
ci_pipeline_id 44944727 44944727
cpu_model Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz
jdkVersion 11.0.21 11.0.21
jmhVersion 1.36 1.36
jvm /usr/lib/jvm/java-11-openjdk-amd64/bin/java /usr/lib/jvm/java-11-openjdk-amd64/bin/java
jvmArgs -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/consumer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/go/src/github.com/DataDog/apm-reliability/dd-trace-java/platform/src/consumer-benchmark/build/tmp/jmh -Duser.country=US -Duser.language=en -Duser.variant
vmName OpenJDK 64-Bit Server VM OpenJDK 64-Bit Server VM
vmVersion 11.0.21+9-post-Ubuntu-0ubuntu122.04 11.0.21+9-post-Ubuntu-0ubuntu122.04

Summary

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

See unchanged results
scenario Δ mean throughput
scenario:not-instrumented/KafkaConsumerBenchmark.benchConsume same
scenario:only-tracing-dsm-disabled-benchmarks/KafkaConsumerBenchmark.benchConsume same
scenario:only-tracing-dsm-enabled-benchmarks/KafkaConsumerBenchmark.benchConsume same

public static class HikariGetConnectionAdvice {
@Advice.OnMethodEnter(suppress = Throwable.class)
public static void start(@Advice.This final HikariDataSource ds) {
if (activeSpan() == null) {
Copy link
Collaborator

@amarziali amarziali Sep 25, 2024

Choose a reason for hiding this comment

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

This won't work because it relies on the DatasourceInstrumentation that's disabled by default. The test passes because injectSysConfig("dd.integration.jdbc-datasource.enabled", "true")
Also there are two advices kickin in on the same method enter and here we assume an execution order.
Also, in order to do a split-by-tag on the jdbc.query spans, you should add this tag on the statement span and not on the connection span.

An approach might be here to store that pool information on the DBInfo state that's stored when the connection is created. In fact DriverInstrumentation already link java.sql.Connection to DbInfo. So here you can use the InstrumentationContext to retrieve that dbInfo value and enrich it with the hikari pool. Then, you shall ensure that that the tag is added when the statement spans are created

}

String hikariPoolname = ds.getPoolName();
DBInfo dbInfo = InstrumentationContext.get(Connection.class, DBInfo.class).get(unwrapped);
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: check for null before using get()

Copy link
Collaborator

@amarziali amarziali left a comment

Choose a reason for hiding this comment

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

LGTM. Hikari 6 is not yet tested hence the lockfile should be bumped before merging

Copy link
Contributor

@nayeem-kamal nayeem-kamal left a comment

Choose a reason for hiding this comment

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

LGTM

@jordan-wong jordan-wong enabled auto-merge (squash) October 16, 2024 13:52
@jordan-wong jordan-wong merged commit 4426423 into master Oct 16, 2024
98 of 101 checks passed
@jordan-wong jordan-wong deleted the add-hikari-poolname-tag branch October 16, 2024 14:02
@github-actions github-actions bot added this to the 1.41.0 milestone Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants