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 full APM/DBM mode for Oracle #8090

Merged
merged 13 commits into from
Dec 20, 2024

Conversation

nenadnoveljic
Copy link
Contributor

@nenadnoveljic nenadnoveljic commented Dec 13, 2024

What Does This Do

Adding trace injection (full mode APM/DBM) to the Oracle database.

Motivation

Customers want to get execution plans for SQL spans.

Additional Notes

Trace context is passed through the V$SESSION.ACTION field and sampled by the agent. This process adds no database overhead or extra roundtrip, as the JDBC driver defers the instrumentation call and sends it with the next statement.

image

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@pr-commenter
Copy link

pr-commenter bot commented Dec 13, 2024

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master nenadnoveljic/dbm-oracle-full-mode-2
git_commit_date 1734688094 1734688503
git_commit_sha ab205f6 f8907b1
release_version 1.45.0-SNAPSHOT~ab205f6a56 1.45.0-SNAPSHOT~f8907b1c18
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1734691130 1734691130
ci_job_id 746799462 746799462
ci_pipeline_id 51642567 51642567
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 4 performance improvements and 0 performance regressions! Performance is the same for 49 metrics, 10 unstable metrics.

scenario Δ mean execution_time candidate mean execution_time baseline mean execution_time
scenario:startup:insecure-bank:iast:Telemetry better
[-1023.745µs; -766.210µs] or [-12.402%; -9.282%]
7.360ms 8.255ms
scenario:startup:insecure-bank:iast_HARDCODED_SECRET_DISABLED:Telemetry better
[-1013.747µs; -792.746µs] or [-12.252%; -9.581%]
7.371ms 8.274ms
scenario:startup:insecure-bank:iast_TELEMETRY_OFF:Telemetry better
[-1007.401µs; -645.663µs] or [-12.223%; -7.834%]
7.416ms 8.242ms
scenario:startup:petclinic:iast:Telemetry better
[-1050.062µs; -768.574µs] or [-12.668%; -9.272%]
7.380ms 8.289ms
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.45.0-SNAPSHOT~f8907b1c18, baseline=1.45.0-SNAPSHOT~ab205f6a56

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.109 s) : 0, 1109008
Total [baseline] (8.678 s) : 0, 8678194
Agent [candidate] (1.094 s) : 0, 1093597
Total [candidate] (8.642 s) : 0, 8641687
section iast
Agent [baseline] (1.236 s) : 0, 1236346
Total [baseline] (9.215 s) : 0, 9214895
Agent [candidate] (1.221 s) : 0, 1220874
Total [candidate] (9.175 s) : 0, 9174995
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.247 s) : 0, 1247221
Total [baseline] (9.206 s) : 0, 9206113
Agent [candidate] (1.222 s) : 0, 1222132
Total [candidate] (9.139 s) : 0, 9138744
section iast_TELEMETRY_OFF
Agent [baseline] (1.242 s) : 0, 1242407
Total [baseline] (9.227 s) : 0, 9226857
Agent [candidate] (1.215 s) : 0, 1215397
Total [candidate] (9.177 s) : 0, 9177151
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.109 s -
Agent iast 1.236 s 127.338 ms (11.5%)
Agent iast_HARDCODED_SECRET_DISABLED 1.247 s 138.213 ms (12.5%)
Agent iast_TELEMETRY_OFF 1.242 s 133.399 ms (12.0%)
Total tracing 8.678 s -
Total iast 9.215 s 536.7 ms (6.2%)
Total iast_HARDCODED_SECRET_DISABLED 9.206 s 527.919 ms (6.1%)
Total iast_TELEMETRY_OFF 9.227 s 548.663 ms (6.3%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.094 s -
Agent iast 1.221 s 127.277 ms (11.6%)
Agent iast_HARDCODED_SECRET_DISABLED 1.222 s 128.535 ms (11.8%)
Agent iast_TELEMETRY_OFF 1.215 s 121.8 ms (11.1%)
Total tracing 8.642 s -
Total iast 9.175 s 533.308 ms (6.2%)
Total iast_HARDCODED_SECRET_DISABLED 9.139 s 497.057 ms (5.8%)
Total iast_TELEMETRY_OFF 9.177 s 535.464 ms (6.2%)
gantt
    title insecure-bank - break down per module: candidate=1.45.0-SNAPSHOT~f8907b1c18, baseline=1.45.0-SNAPSHOT~ab205f6a56

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (710.986 ms) : 0, 710986
BytebuddyAgent [candidate] (696.26 ms) : 0, 696260
GlobalTracer [baseline] (318.514 ms) : 0, 318514
GlobalTracer [candidate] (317.471 ms) : 0, 317471
AppSec [baseline] (55.037 ms) : 0, 55037
AppSec [candidate] (54.895 ms) : 0, 54895
Remote Config [baseline] (668.344 µs) : 0, 668
Remote Config [candidate] (675.931 µs) : 0, 676
Telemetry [baseline] (8.839 ms) : 0, 8839
Telemetry [candidate] (10.582 ms) : 0, 10582
section iast
BytebuddyAgent [baseline] (827.015 ms) : 0, 827015
BytebuddyAgent [candidate] (814.012 ms) : 0, 814012
GlobalTracer [baseline] (307.796 ms) : 0, 307796
GlobalTracer [candidate] (306.562 ms) : 0, 306562
AppSec [baseline] (56.957 ms) : 0, 56957
AppSec [candidate] (57.717 ms) : 0, 57717
IAST [baseline] (20.873 ms) : 0, 20873
IAST [candidate] (20.821 ms) : 0, 20821
Remote Config [baseline] (609.346 µs) : 0, 609
Remote Config [candidate] (616.049 µs) : 0, 616
Telemetry [baseline] (8.255 ms) : 0, 8255
Telemetry [candidate] (7.36 ms) : 0, 7360
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (833.768 ms) : 0, 833768
BytebuddyAgent [candidate] (814.568 ms) : 0, 814568
GlobalTracer [baseline] (311.574 ms) : 0, 311574
GlobalTracer [candidate] (306.727 ms) : 0, 306727
AppSec [baseline] (56.852 ms) : 0, 56852
AppSec [candidate] (57.327 ms) : 0, 57327
IAST [baseline] (21.2 ms) : 0, 21200
IAST [candidate] (21.803 ms) : 0, 21803
Remote Config [baseline] (607.173 µs) : 0, 607
Remote Config [candidate] (593.563 µs) : 0, 594
Telemetry [baseline] (8.274 ms) : 0, 8274
Telemetry [candidate] (7.371 ms) : 0, 7371
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (829.412 ms) : 0, 829412
BytebuddyAgent [candidate] (809.957 ms) : 0, 809957
GlobalTracer [baseline] (309.631 ms) : 0, 309631
GlobalTracer [candidate] (305.597 ms) : 0, 305597
AppSec [baseline] (57.735 ms) : 0, 57735
AppSec [candidate] (57.483 ms) : 0, 57483
IAST [baseline] (21.759 ms) : 0, 21759
IAST [candidate] (20.574 ms) : 0, 20574
Remote Config [baseline] (625.201 µs) : 0, 625
Remote Config [candidate] (631.186 µs) : 0, 631
Telemetry [baseline] (8.242 ms) : 0, 8242
Telemetry [candidate] (7.416 ms) : 0, 7416
Loading
Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.45.0-SNAPSHOT~f8907b1c18, baseline=1.45.0-SNAPSHOT~ab205f6a56

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.112 s) : 0, 1111630
Total [baseline] (10.423 s) : 0, 10422535
Agent [candidate] (1.102 s) : 0, 1101763
Total [candidate] (10.416 s) : 0, 10415933
section appsec
Agent [baseline] (1.249 s) : 0, 1248742
Total [baseline] (10.678 s) : 0, 10678439
Agent [candidate] (1.232 s) : 0, 1232155
Total [candidate] (10.671 s) : 0, 10670855
section iast
Agent [baseline] (1.238 s) : 0, 1238205
Total [baseline] (10.974 s) : 0, 10974200
Agent [candidate] (1.221 s) : 0, 1221206
Total [candidate] (10.977 s) : 0, 10977150
section profiling
Agent [baseline] (1.337 s) : 0, 1336615
Total [baseline] (10.855 s) : 0, 10855271
Agent [candidate] (1.324 s) : 0, 1324132
Total [candidate] (10.781 s) : 0, 10780647
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.112 s -
Agent appsec 1.249 s 137.112 ms (12.3%)
Agent iast 1.238 s 126.575 ms (11.4%)
Agent profiling 1.337 s 224.985 ms (20.2%)
Total tracing 10.423 s -
Total appsec 10.678 s 255.904 ms (2.5%)
Total iast 10.974 s 551.665 ms (5.3%)
Total profiling 10.855 s 432.736 ms (4.2%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.102 s -
Agent appsec 1.232 s 130.392 ms (11.8%)
Agent iast 1.221 s 119.443 ms (10.8%)
Agent profiling 1.324 s 222.369 ms (20.2%)
Total tracing 10.416 s -
Total appsec 10.671 s 254.922 ms (2.4%)
Total iast 10.977 s 561.217 ms (5.4%)
Total profiling 10.781 s 364.714 ms (3.5%)
gantt
    title petclinic - break down per module: candidate=1.45.0-SNAPSHOT~f8907b1c18, baseline=1.45.0-SNAPSHOT~ab205f6a56

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (713.958 ms) : 0, 713958
BytebuddyAgent [candidate] (701.169 ms) : 0, 701169
GlobalTracer [baseline] (318.152 ms) : 0, 318152
GlobalTracer [candidate] (319.257 ms) : 0, 319257
AppSec [baseline] (54.997 ms) : 0, 54997
AppSec [candidate] (54.778 ms) : 0, 54778
Remote Config [baseline] (672.413 µs) : 0, 672
Remote Config [candidate] (690.055 µs) : 0, 690
Telemetry [baseline] (8.867 ms) : 0, 8867
Telemetry [candidate] (12.009 ms) : 0, 12009
section appsec
BytebuddyAgent [baseline] (730.288 ms) : 0, 730288
BytebuddyAgent [candidate] (716.476 ms) : 0, 716476
GlobalTracer [baseline] (315.326 ms) : 0, 315326
GlobalTracer [candidate] (315.902 ms) : 0, 315902
AppSec [baseline] (168.758 ms) : 0, 168758
AppSec [candidate] (167.05 ms) : 0, 167050
Remote Config [baseline] (648.701 µs) : 0, 649
Remote Config [candidate] (656.386 µs) : 0, 656
Telemetry [baseline] (8.913 ms) : 0, 8913
Telemetry [candidate] (8.246 ms) : 0, 8246
IAST [baseline] (19.754 ms) : 0, 19754
IAST [candidate] (19.993 ms) : 0, 19993
section iast
BytebuddyAgent [baseline] (827.743 ms) : 0, 827743
BytebuddyAgent [candidate] (814.398 ms) : 0, 814398
GlobalTracer [baseline] (307.565 ms) : 0, 307565
GlobalTracer [candidate] (306.184 ms) : 0, 306184
AppSec [baseline] (58.07 ms) : 0, 58070
AppSec [candidate] (57.936 ms) : 0, 57936
Remote Config [baseline] (611.762 µs) : 0, 612
Remote Config [candidate] (623.003 µs) : 0, 623
Telemetry [baseline] (8.289 ms) : 0, 8289
Telemetry [candidate] (7.38 ms) : 0, 7380
IAST [baseline] (21.057 ms) : 0, 21057
IAST [candidate] (20.977 ms) : 0, 20977
section profiling
BytebuddyAgent [baseline] (700.032 ms) : 0, 700032
BytebuddyAgent [candidate] (693.223 ms) : 0, 693223
GlobalTracer [baseline] (438.653 ms) : 0, 438653
GlobalTracer [candidate] (435.031 ms) : 0, 435031
AppSec [baseline] (53.805 ms) : 0, 53805
AppSec [candidate] (53.997 ms) : 0, 53997
Remote Config [baseline] (655.654 µs) : 0, 656
Remote Config [candidate] (680.055 µs) : 0, 680
Telemetry [baseline] (7.878 ms) : 0, 7878
Telemetry [candidate] (7.752 ms) : 0, 7752
ProfilingAgent [baseline] (94.088 ms) : 0, 94088
ProfilingAgent [candidate] (94.202 ms) : 0, 94202
Profiling [baseline] (94.112 ms) : 0, 94112
Profiling [candidate] (94.226 ms) : 0, 94226
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-12-20T10:09:02 2024-12-20T10:16:02
git_branch master nenadnoveljic/dbm-oracle-full-mode-2
git_commit_date 1734688094 1734688503
git_commit_sha ab205f6 f8907b1
release_version 1.45.0-SNAPSHOT~ab205f6a56 1.45.0-SNAPSHOT~f8907b1c18
start_time 2024-12-20T10:08:49 2024-12-20T10:15:48
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1734690113 1734690113
ci_job_id 746799463 746799463
ci_pipeline_id 51642567 51642567
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 11 metrics, 17 unstable metrics.

Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~f8907b1c18, baseline=1.45.0-SNAPSHOT~ab205f6a56
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.351 ms) : 1332, 1370
.   : milestone, 1351,
appsec (1.749 ms) : 1725, 1773
.   : milestone, 1749,
appsec_no_iast (1.742 ms) : 1717, 1767
.   : milestone, 1742,
iast (1.484 ms) : 1461, 1506
.   : milestone, 1484,
profiling (1.548 ms) : 1523, 1573
.   : milestone, 1548,
tracing (1.486 ms) : 1462, 1510
.   : milestone, 1486,
section candidate
no_agent (1.36 ms) : 1340, 1379
.   : milestone, 1360,
appsec (1.751 ms) : 1727, 1774
.   : milestone, 1751,
appsec_no_iast (1.731 ms) : 1706, 1756
.   : milestone, 1731,
iast (1.496 ms) : 1473, 1518
.   : milestone, 1496,
profiling (1.514 ms) : 1491, 1538
.   : milestone, 1514,
tracing (1.457 ms) : 1431, 1483
.   : milestone, 1457,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.351 ms [1.332 ms, 1.37 ms] -
appsec 1.749 ms [1.725 ms, 1.773 ms] 398.103 µs (29.5%)
appsec_no_iast 1.742 ms [1.717 ms, 1.767 ms] 391.193 µs (29.0%)
iast 1.484 ms [1.461 ms, 1.506 ms] 132.771 µs (9.8%)
profiling 1.548 ms [1.523 ms, 1.573 ms] 197.278 µs (14.6%)
tracing 1.486 ms [1.462 ms, 1.51 ms] 135.399 µs (10.0%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.36 ms [1.34 ms, 1.379 ms] -
appsec 1.751 ms [1.727 ms, 1.774 ms] 390.767 µs (28.7%)
appsec_no_iast 1.731 ms [1.706 ms, 1.756 ms] 371.148 µs (27.3%)
iast 1.496 ms [1.473 ms, 1.518 ms] 135.947 µs (10.0%)
profiling 1.514 ms [1.491 ms, 1.538 ms] 154.57 µs (11.4%)
tracing 1.457 ms [1.431 ms, 1.483 ms] 97.392 µs (7.2%)
Request duration reports for insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~f8907b1c18, baseline=1.45.0-SNAPSHOT~ab205f6a56
    dateFormat X
    axisFormat %s
section baseline
no_agent (377.808 µs) : 358, 397
.   : milestone, 378,
iast (491.242 µs) : 470, 513
.   : milestone, 491,
iast_FULL (647.147 µs) : 626, 668
.   : milestone, 647,
iast_GLOBAL (519.604 µs) : 497, 542
.   : milestone, 520,
iast_HARDCODED_SECRET_DISABLED (483.063 µs) : 462, 505
.   : milestone, 483,
iast_INACTIVE (455.081 µs) : 434, 476
.   : milestone, 455,
iast_TELEMETRY_OFF (484.712 µs) : 463, 506
.   : milestone, 485,
tracing (451.572 µs) : 430, 473
.   : milestone, 452,
section candidate
no_agent (383.372 µs) : 363, 403
.   : milestone, 383,
iast (491.701 µs) : 470, 513
.   : milestone, 492,
iast_FULL (647.422 µs) : 626, 669
.   : milestone, 647,
iast_GLOBAL (525.893 µs) : 505, 547
.   : milestone, 526,
iast_HARDCODED_SECRET_DISABLED (484.457 µs) : 463, 506
.   : milestone, 484,
iast_INACTIVE (451.738 µs) : 431, 473
.   : milestone, 452,
iast_TELEMETRY_OFF (485.244 µs) : 464, 507
.   : milestone, 485,
tracing (453.1 µs) : 431, 475
.   : milestone, 453,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 377.808 µs [358.205 µs, 397.411 µs] -
iast 491.242 µs [469.7 µs, 512.785 µs] 113.434 µs (30.0%)
iast_FULL 647.147 µs [625.846 µs, 668.448 µs] 269.339 µs (71.3%)
iast_GLOBAL 519.604 µs [497.481 µs, 541.727 µs] 141.796 µs (37.5%)
iast_HARDCODED_SECRET_DISABLED 483.063 µs [461.57 µs, 504.556 µs] 105.255 µs (27.9%)
iast_INACTIVE 455.081 µs [433.97 µs, 476.192 µs] 77.273 µs (20.5%)
iast_TELEMETRY_OFF 484.712 µs [463.13 µs, 506.295 µs] 106.905 µs (28.3%)
tracing 451.572 µs [429.895 µs, 473.249 µs] 73.764 µs (19.5%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 383.372 µs [363.353 µs, 403.391 µs] -
iast 491.701 µs [469.963 µs, 513.438 µs] 108.329 µs (28.3%)
iast_FULL 647.422 µs [625.668 µs, 669.176 µs] 264.05 µs (68.9%)
iast_GLOBAL 525.893 µs [504.561 µs, 547.224 µs] 142.521 µs (37.2%)
iast_HARDCODED_SECRET_DISABLED 484.457 µs [463.336 µs, 505.579 µs] 101.085 µs (26.4%)
iast_INACTIVE 451.738 µs [430.549 µs, 472.926 µs] 68.365 µs (17.8%)
iast_TELEMETRY_OFF 485.244 µs [463.539 µs, 506.949 µs] 101.872 µs (26.6%)
tracing 453.1 µs [430.817 µs, 475.383 µs] 69.728 µs (18.2%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master nenadnoveljic/dbm-oracle-full-mode-2
git_commit_date 1734688094 1734688503
git_commit_sha ab205f6 f8907b1
release_version 1.45.0-SNAPSHOT~ab205f6a56 1.45.0-SNAPSHOT~f8907b1c18
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1734690687 1734690687
ci_job_id 746799464 746799464
ci_pipeline_id 51642567 51642567
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 biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~f8907b1c18, baseline=1.45.0-SNAPSHOT~ab205f6a56
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.007 s) : 15007000, 15007000
.   : milestone, 15007000,
appsec (14.996 s) : 14996000, 14996000
.   : milestone, 14996000,
iast (18.672 s) : 18672000, 18672000
.   : milestone, 18672000,
iast_GLOBAL (17.573 s) : 17573000, 17573000
.   : milestone, 17573000,
profiling (14.972 s) : 14972000, 14972000
.   : milestone, 14972000,
tracing (15.226 s) : 15226000, 15226000
.   : milestone, 15226000,
section candidate
no_agent (15.4 s) : 15400000, 15400000
.   : milestone, 15400000,
appsec (15.086 s) : 15086000, 15086000
.   : milestone, 15086000,
iast (18.87 s) : 18870000, 18870000
.   : milestone, 18870000,
iast_GLOBAL (17.992 s) : 17992000, 17992000
.   : milestone, 17992000,
profiling (15.1 s) : 15100000, 15100000
.   : milestone, 15100000,
tracing (15.087 s) : 15087000, 15087000
.   : milestone, 15087000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.007 s [15.007 s, 15.007 s] -
appsec 14.996 s [14.996 s, 14.996 s] -11.0 ms (-0.1%)
iast 18.672 s [18.672 s, 18.672 s] 3.665 s (24.4%)
iast_GLOBAL 17.573 s [17.573 s, 17.573 s] 2.566 s (17.1%)
profiling 14.972 s [14.972 s, 14.972 s] -35.0 ms (-0.2%)
tracing 15.226 s [15.226 s, 15.226 s] 219.0 ms (1.5%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.4 s [15.4 s, 15.4 s] -
appsec 15.086 s [15.086 s, 15.086 s] -314.0 ms (-2.0%)
iast 18.87 s [18.87 s, 18.87 s] 3.47 s (22.5%)
iast_GLOBAL 17.992 s [17.992 s, 17.992 s] 2.592 s (16.8%)
profiling 15.1 s [15.1 s, 15.1 s] -300.0 ms (-1.9%)
tracing 15.087 s [15.087 s, 15.087 s] -313.0 ms (-2.0%)
Execution time for tomcat
gantt
    title tomcat - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~f8907b1c18, baseline=1.45.0-SNAPSHOT~ab205f6a56
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.478 ms) : 1466, 1489
.   : milestone, 1478,
appsec (2.359 ms) : 2317, 2401
.   : milestone, 2359,
iast (2.101 ms) : 2048, 2154
.   : milestone, 2101,
iast_GLOBAL (2.147 ms) : 2094, 2200
.   : milestone, 2147,
profiling (1.991 ms) : 1946, 2036
.   : milestone, 1991,
tracing (1.947 ms) : 1907, 1988
.   : milestone, 1947,
section candidate
no_agent (1.478 ms) : 1466, 1490
.   : milestone, 1478,
appsec (2.36 ms) : 2318, 2401
.   : milestone, 2360,
iast (2.101 ms) : 2048, 2154
.   : milestone, 2101,
iast_GLOBAL (2.134 ms) : 2081, 2187
.   : milestone, 2134,
profiling (1.979 ms) : 1937, 2021
.   : milestone, 1979,
tracing (1.94 ms) : 1900, 1980
.   : milestone, 1940,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.478 ms [1.466 ms, 1.489 ms] -
appsec 2.359 ms [2.317 ms, 2.401 ms] 881.311 µs (59.6%)
iast 2.101 ms [2.048 ms, 2.154 ms] 623.78 µs (42.2%)
iast_GLOBAL 2.147 ms [2.094 ms, 2.2 ms] 669.092 µs (45.3%)
profiling 1.991 ms [1.946 ms, 2.036 ms] 513.443 µs (34.7%)
tracing 1.947 ms [1.907 ms, 1.988 ms] 469.502 µs (31.8%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.478 ms [1.466 ms, 1.49 ms] -
appsec 2.36 ms [2.318 ms, 2.401 ms] 881.911 µs (59.7%)
iast 2.101 ms [2.048 ms, 2.154 ms] 623.373 µs (42.2%)
iast_GLOBAL 2.134 ms [2.081 ms, 2.187 ms] 656.006 µs (44.4%)
profiling 1.979 ms [1.937 ms, 2.021 ms] 501.543 µs (33.9%)
tracing 1.94 ms [1.9 ms, 1.98 ms] 462.051 µs (31.3%)

@nenadnoveljic nenadnoveljic force-pushed the nenadnoveljic/dbm-oracle-full-mode-2 branch 4 times, most recently from 21db4f2 to 42efe61 Compare December 17, 2024 05:09
@nenadnoveljic nenadnoveljic force-pushed the nenadnoveljic/dbm-oracle-full-mode-2 branch from 2028a40 to 907ad6b Compare December 17, 2024 15:05
@nenadnoveljic nenadnoveljic marked this pull request as ready for review December 17, 2024 15:52
@nenadnoveljic nenadnoveljic requested review from a team as code owners December 17, 2024 15:52
@nenadnoveljic nenadnoveljic requested a review from ygree December 17, 2024 15:52
Copy link
Contributor

github-actions bot commented Dec 17, 2024

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Add at least one type, and one component or instrumentation label to the pull request

If you need help, please check our contributing guidelines.

@nenadnoveljic nenadnoveljic added comp: database Database Monitoring inst: jdbc JDBC instrumentation type: enhancement labels Dec 17, 2024
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 platform-wise. You might want some feedback from IDM though

final long spanID = DECORATE.setContextInfo(connection, dbInfo);
// we then force that pre-determined span ID for the span covering the actual query
span = AgentTracer.get().buildSpan(DATABASE_QUERY).withSpanId(spanID).start();
if (INJECT_COMMENT && injectTraceContext) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: What about having only one startSpan() as default case, and grouping custom span decoration together like:

if (INJECT_COMMENT && injectTraceContext && (isSqlServer || isOracle)) {
  if (isSqlServer) { 
    // DECORATE + build/start
  } else if (isOracle) {
    // start + DECORATE
  }
 } else {
   startSpan()
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Understood. Is it OK to merge the PR as it is, and do the change when we remove the instrumentation span for SQL Server? The line 96 (span = AgentTracer.get().buildSpan(DATABASE_QUERY).withSpanId(spanID).start();) will then become span = startSpan(DATABASE_QUERY);, so we'll be able to remove span = startSpan(DATABASE_QUERY); from all branches.

if (priority == null) {
return;
}
final String traceContext = "_DD_" + DECORATE.traceParent(span, priority);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: maybe extract "_DD_" to a constant, like OracleActionPrefix or something ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

final long spanID = DECORATE.setContextInfo(connection, dbInfo);
// we then force that pre-determined span ID for the span covering the actual query
span = AgentTracer.get().buildSpan(DATABASE_QUERY).withSpanId(spanID).start();
} else if (DECORATE.isOracle(dbInfo)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: it's weird that we have a decorate method for isOracle while isSqlServer is computed here. I feel like this should be unified.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed now

Copy link
Contributor

@vandonr vandonr left a comment

Choose a reason for hiding this comment

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

approved, only nits in my comments

nenadnoveljic and others added 2 commits December 20, 2024 10:44
@nenadnoveljic nenadnoveljic merged commit 9e342ef into master Dec 20, 2024
148 checks passed
@nenadnoveljic nenadnoveljic deleted the nenadnoveljic/dbm-oracle-full-mode-2 branch December 20, 2024 11:07
@github-actions github-actions bot added this to the 1.45.0 milestone Dec 20, 2024
svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request Jan 9, 2025
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
|
[com.google.api.grpc:proto-google-common-protos](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.50.0` -> `2.50.1` |
|
[com.google.cloud:google-cloud-core-http](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.49.0` -> `2.49.1` |
|
[com.google.cloud:google-cloud-core](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.49.0` -> `2.49.1` |
| [com.google.api:gax](https://github.com/googleapis/sdk-platform-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.59.0` -> `2.59.1` |
| [com.datadoghq:dd-trace-api](https://github.com/datadog/dd-trace-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.44.1` -> `1.45.0` |
| [com.datadoghq:dd-trace-ot](https://github.com/datadog/dd-trace-java)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.44.1` -> `1.45.0` |
| [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.29.47` -> `2.29.48` |
|
[software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.29.47` -> `2.29.48` |
| [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.29.47` -> `2.29.48` |
| [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.29.47` -> `2.29.48` |
| [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.29.47` -> `2.29.48` |
| [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.29.47` -> `2.29.48` |

---

### Release Notes

<details>
<summary>datadog/dd-trace-java (com.datadoghq:dd-trace-api)</summary>

###
[`v1.45.0`](https://github.com/DataDog/dd-trace-java/releases/tag/v1.45.0):
1.45.0

##### Breaking changes

> \[!WARNING]\
> Support for custom scope manager using OpenTelemetry tracer artifact
(`dd-trace-ot`) is dropped.
> Tracing with OpenTracing API and custom scope manager will continue to
work on 1.44.x releases.

##### Components

##### Application Security Management (IAST)

- ✨ Add propagation to URI#toURL method
([#&#8203;8146](DataDog/dd-trace-java#8146) -
[@&#8203;manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez))
- ✨ Increase IAST propagation to StringBuilder setLength
([#&#8203;8119](DataDog/dd-trace-java#8119) -
[@&#8203;Mariovido](https://github.com/Mariovido))
- ✨ Increase IAST propagation to StringBuffer append
([#&#8203;8082](DataDog/dd-trace-java#8082) -
[@&#8203;Mariovido](https://github.com/Mariovido))
- ✨ Handle IAST security controls custom validation and
sanitization methods
([#&#8203;7997](DataDog/dd-trace-java#7997) -
[@&#8203;jandro996](https://github.com/jandro996))

##### Application Security Management (WAF)

- ✨ Update user lifecycle tracking to V3
([#&#8203;8108](DataDog/dd-trace-java#8108) -
[@&#8203;manuel-alvarez-alvarez](https://github.com/manuel-alvarez-alvarez))
- ✨ Exploit prevention for Shell Injection / Command Injection
([#&#8203;7615](DataDog/dd-trace-java#7615) -
[@&#8203;jandro996](https://github.com/jandro996))

##### Build & Tooling

- 💡 Support instrumentation of repackaged libraries
([#&#8203;8153](DataDog/dd-trace-java#8153) -
[@&#8203;mcculls](https://github.com/mcculls))
- ✨ Configure native image build setting for JDK-22 based
GraalVM
([#&#8203;8092](DataDog/dd-trace-java#8092) -
[@&#8203;MattAlp](https://github.com/MattAlp))

##### Database Monitoring

- ✨ Add full APM/DBM mode for Oracle
([#&#8203;8090](DataDog/dd-trace-java#8090) -
[@&#8203;nenadnoveljic](https://github.com/nenadnoveljic))

##### Dynamic Instrumentation

- 🐛 make local var hoisting disabled by default
([#&#8203;8158](DataDog/dd-trace-java#8158) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Fix var hoisting issue when no previous store
([#&#8203;8122](DataDog/dd-trace-java#8122) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- ✨ Only decorate spans without code origin information
([#&#8203;8105](DataDog/dd-trace-java#8105) -
[@&#8203;evanchooly](https://github.com/evanchooly))
- 🐛 Fix suspend Kotlin methods instrumentation
([#&#8203;8080](DataDog/dd-trace-java#8080) -
[@&#8203;jpbempel](https://github.com/jpbempel))
- 🐛 Fix class file version detection
([#&#8203;8057](DataDog/dd-trace-java#8057) -
[@&#8203;jpbempel](https://github.com/jpbempel))

##### GraalVM native-image

- ✨ Configure native image build setting for JDK-22 based
GraalVM
([#&#8203;8092](DataDog/dd-trace-java#8092) -
[@&#8203;MattAlp](https://github.com/MattAlp))

##### ML Observability (LLMObs)

- ✨🧪 Add LLMObs configuration
([#&#8203;8076](DataDog/dd-trace-java#8076) -
[@&#8203;gary-huang](https://github.com/gary-huang))

##### Metrics

- Bump integrations-core submodule to 7.60.0
([#&#8203;8098](DataDog/dd-trace-java#8098) -
[@&#8203;mcculls](https://github.com/mcculls))
- Upgrade to java-dogstatsd-client v4.4.3
([#&#8203;8096](DataDog/dd-trace-java#8096) -
[@&#8203;mcculls](https://github.com/mcculls))

##### OpenTracing

- ⚠️🧹 Remove custom scope manager support
([#&#8203;8164](DataDog/dd-trace-java#8164) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))

##### Telemetry

- ✨ Retry telemetry requests if CI Visibility is enabled
([#&#8203;8147](DataDog/dd-trace-java#8147) -
[@&#8203;nikita-tkachenko-datadog](https://github.com/nikita-tkachenko-datadog))
- ✨ Add configurable Dependency service resolution period
([#&#8203;8079](DataDog/dd-trace-java#8079) -
[@&#8203;jandro996](https://github.com/jandro996))

##### Testing

- 🐛 Remove restriction to not run vertx4 latest tests on java 17
([#&#8203;8133](DataDog/dd-trace-java#8133) -
[@&#8203;vandonr](https://github.com/vandonr))

##### Tracer core

- ✨ Defer remote components to avoid OkHttp class-loading
side-effects
([#&#8203;8131](DataDog/dd-trace-java#8131) -
[@&#8203;mcculls](https://github.com/mcculls))
- ✨ Improve Context API null handling and Javadoc
([#&#8203;8129](DataDog/dd-trace-java#8129) -
[@&#8203;PerfectSlayer](https://github.com/PerfectSlayer))
- 🐛⚡ Avoid performing blocking I/O operation on application
thread
([#&#8203;8120](DataDog/dd-trace-java#8120) -
[@&#8203;mcculls](https://github.com/mcculls))
- 💡 Introduce a shared context component, independent of tracing
([#&#8203;8117](DataDog/dd-trace-java#8117) -
[@&#8203;mcculls](https://github.com/mcculls))
- ✨ Improves ServiceNameCollector
([#&#8203;8109](DataDog/dd-trace-java#8109) -
[@&#8203;amarziali](https://github.com/amarziali))
- Upgrade to ASM 9.7.1 (adds new constant for Java 24)
([#&#8203;8097](DataDog/dd-trace-java#8097) -
[@&#8203;mcculls](https://github.com/mcculls))
- 🐛 Dynamically evaluate service name for message consumers
([#&#8203;8088](DataDog/dd-trace-java#8088) -
[@&#8203;amarziali](https://github.com/amarziali))

##### Serverless

- 🐛 Add avoid double instrumenting lambda non-streaming handlers.
([#&#8203;8073](DataDog/dd-trace-java#8073) -
[@&#8203;purple4reina](https://github.com/purple4reina))

##### Instrumentations

##### AWS SDK instrumentation

- 💡 Instrument EMR's relocated AWS SDK
([#&#8203;8157](DataDog/dd-trace-java#8157) -
[@&#8203;mcculls](https://github.com/mcculls))

##### Eclipse Vert.x instrumentation

- 🐛 Remove restriction to not run vertx4 latest tests on java 17
([#&#8203;8133](DataDog/dd-trace-java#8133) -
[@&#8203;vandonr](https://github.com/vandonr))

##### JDBC instrumentation

- ✨ Add full APM/DBM mode for Oracle
([#&#8203;8090](DataDog/dd-trace-java#8090) -
[@&#8203;nenadnoveljic](https://github.com/nenadnoveljic))

##### Jetty instrumentation

- 🐛 Ensure jetty 12 has servlet.path starting with /
([#&#8203;8093](DataDog/dd-trace-java#8093) -
[@&#8203;github-actions](https://github.com/github-actions)\[bot])

##### JMS instrumentation

- 🧹 Re-use `javax` JMS module for `jakarta` namespace
([#&#8203;8155](DataDog/dd-trace-java#8155) -
[@&#8203;mcculls](https://github.com/mcculls))
- 🧹 Group `javax.jms` instrumentations under a single module
([#&#8203;8154](DataDog/dd-trace-java#8154) -
[@&#8203;mcculls](https://github.com/mcculls))

##### Reactor instrumentation

- 🐛 Reactor: early propagate span in context when subscribing
([#&#8203;8166](DataDog/dd-trace-java#8166) -
[@&#8203;amarziali](https://github.com/amarziali))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am
every weekday" in timezone Australia/Melbourne, Automerge - At any time
(no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

GitOrigin-RevId: ba2355aa4e2e39ab1fee27319cc4176238efd90b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: database Database Monitoring inst: jdbc JDBC instrumentation type: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants