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

Full mode for SQL Server #7186

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open

Conversation

nenadnoveljic
Copy link

@nenadnoveljic nenadnoveljic commented Jun 13, 2024

What Does This Do

Add full APM/DBM mode for SQL Server.

Motivation

A large demand.

Additional Notes

Jira ticket: [PROJ-IDENT]

@nenadnoveljic nenadnoveljic self-assigned this Jun 13, 2024
@pr-commenter
Copy link

pr-commenter bot commented Jun 13, 2024

Benchmarks

Startup

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master nenanoveljic/sqlserver-full
git_commit_date 1720794919 1720899560
git_commit_sha 0e5e274 59fca78
release_version 1.38.0-SNAPSHOT~0e5e2749b0 1.36.0-SNAPSHOT~59fca7845d
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1720902757 1720902757
ci_job_id 571652673 571652673
ci_pipeline_id 39108837 39108837
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 48 metrics, 15 unstable metrics.

Startup time reports for petclinic
gantt
    title petclinic - global startup overhead: candidate=1.36.0-SNAPSHOT~59fca7845d, baseline=1.38.0-SNAPSHOT~0e5e2749b0

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.074 s) : 0, 1074499
Total [baseline] (10.375 s) : 0, 10374799
Agent [candidate] (1.064 s) : 0, 1064037
Total [candidate] (10.375 s) : 0, 10375095
section appsec
Agent [baseline] (1.183 s) : 0, 1183476
Total [baseline] (10.464 s) : 0, 10463508
Agent [candidate] (1.193 s) : 0, 1192539
Total [candidate] (10.474 s) : 0, 10474220
section iast
Agent [baseline] (1.179 s) : 0, 1178769
Total [baseline] (10.67 s) : 0, 10670042
Agent [candidate] (1.169 s) : 0, 1169092
Total [candidate] (10.705 s) : 0, 10704620
section profiling
Agent [baseline] (1.268 s) : 0, 1268322
Total [baseline] (10.55 s) : 0, 10550381
Agent [candidate] (1.261 s) : 0, 1260603
Total [candidate] (10.595 s) : 0, 10595275
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.074 s -
Agent appsec 1.183 s 108.977 ms (10.1%)
Agent iast 1.179 s 104.27 ms (9.7%)
Agent profiling 1.268 s 193.823 ms (18.0%)
Total tracing 10.375 s -
Total appsec 10.464 s 88.708 ms (0.9%)
Total iast 10.67 s 295.242 ms (2.8%)
Total profiling 10.55 s 175.582 ms (1.7%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.064 s -
Agent appsec 1.193 s 128.502 ms (12.1%)
Agent iast 1.169 s 105.055 ms (9.9%)
Agent profiling 1.261 s 196.566 ms (18.5%)
Total tracing 10.375 s -
Total appsec 10.474 s 99.124 ms (1.0%)
Total iast 10.705 s 329.524 ms (3.2%)
Total profiling 10.595 s 220.18 ms (2.1%)
gantt
    title petclinic - break down per module: candidate=1.36.0-SNAPSHOT~59fca7845d, baseline=1.38.0-SNAPSHOT~0e5e2749b0

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (672.676 ms) : 0, 672676
BytebuddyAgent [candidate] (666.219 ms) : 0, 666219
GlobalTracer [baseline] (308.216 ms) : 0, 308216
GlobalTracer [candidate] (305.191 ms) : 0, 305191
AppSec [baseline] (50.332 ms) : 0, 50332
AppSec [candidate] (49.935 ms) : 0, 49935
Remote Config [baseline] (673.625 µs) : 0, 674
Remote Config [candidate] (734.856 µs) : 0, 735
Telemetry [baseline] (7.698 ms) : 0, 7698
Telemetry [candidate] (7.49 ms) : 0, 7490
section appsec
BytebuddyAgent [baseline] (676.721 ms) : 0, 676721
BytebuddyAgent [candidate] (681.906 ms) : 0, 681906
GlobalTracer [baseline] (299.499 ms) : 0, 299499
GlobalTracer [candidate] (300.382 ms) : 0, 300382
AppSec [baseline] (153.67 ms) : 0, 153670
AppSec [candidate] (154.539 ms) : 0, 154539
Remote Config [baseline] (623.864 µs) : 0, 624
Remote Config [candidate] (653.981 µs) : 0, 654
Telemetry [baseline] (8.353 ms) : 0, 8353
Telemetry [candidate] (9.432 ms) : 0, 9432
IAST [baseline] (19.658 ms) : 0, 19658
IAST [candidate] (21.565 ms) : 0, 21565
section iast
BytebuddyAgent [baseline] (785.344 ms) : 0, 785344
BytebuddyAgent [candidate] (779.096 ms) : 0, 779096
GlobalTracer [baseline] (297.463 ms) : 0, 297463
GlobalTracer [candidate] (293.745 ms) : 0, 293745
AppSec [baseline] (47.53 ms) : 0, 47530
AppSec [candidate] (47.044 ms) : 0, 47044
Remote Config [baseline] (585.714 µs) : 0, 586
Remote Config [candidate] (605.933 µs) : 0, 606
Telemetry [baseline] (8.538 ms) : 0, 8538
Telemetry [candidate] (8.641 ms) : 0, 8641
IAST [baseline] (25.675 ms) : 0, 25675
IAST [candidate] (26.695 ms) : 0, 26695
section profiling
BytebuddyAgent [baseline] (665.47 ms) : 0, 665470
BytebuddyAgent [candidate] (661.124 ms) : 0, 661124
GlobalTracer [baseline] (388.836 ms) : 0, 388836
GlobalTracer [candidate] (387.438 ms) : 0, 387438
AppSec [baseline] (51.791 ms) : 0, 51791
AppSec [candidate] (51.239 ms) : 0, 51239
Remote Config [baseline] (659.49 µs) : 0, 659
Remote Config [candidate] (671.314 µs) : 0, 671
Telemetry [baseline] (7.334 ms) : 0, 7334
Telemetry [candidate] (7.362 ms) : 0, 7362
ProfilingAgent [baseline] (96.752 ms) : 0, 96752
ProfilingAgent [candidate] (95.778 ms) : 0, 95778
Profiling [baseline] (96.778 ms) : 0, 96778
Profiling [candidate] (95.802 ms) : 0, 95802
Loading
Startup time reports for insecure-bank
gantt
    title insecure-bank - global startup overhead: candidate=1.36.0-SNAPSHOT~59fca7845d, baseline=1.38.0-SNAPSHOT~0e5e2749b0

    dateFormat X
    axisFormat %s
section tracing
Agent [baseline] (1.063 s) : 0, 1063158
Total [baseline] (8.507 s) : 0, 8507077
Agent [candidate] (1.061 s) : 0, 1061132
Total [candidate] (8.49 s) : 0, 8490476
section iast
Agent [baseline] (1.17 s) : 0, 1169677
Total [baseline] (8.98 s) : 0, 8979562
Agent [candidate] (1.175 s) : 0, 1175330
Total [candidate] (8.992 s) : 0, 8992302
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.172 s) : 0, 1172452
Total [baseline] (8.919 s) : 0, 8918800
Agent [candidate] (1.176 s) : 0, 1175779
Total [candidate] (8.928 s) : 0, 8927620
section iast_TELEMETRY_OFF
Agent [baseline] (1.167 s) : 0, 1167181
Total [baseline] (8.925 s) : 0, 8925144
Agent [candidate] (1.18 s) : 0, 1179559
Total [candidate] (8.981 s) : 0, 8980704
Loading
  • baseline results
Module Variant Duration Δ tracing
Agent tracing 1.063 s -
Agent iast 1.17 s 106.519 ms (10.0%)
Agent iast_HARDCODED_SECRET_DISABLED 1.172 s 109.294 ms (10.3%)
Agent iast_TELEMETRY_OFF 1.167 s 104.023 ms (9.8%)
Total tracing 8.507 s -
Total iast 8.98 s 472.485 ms (5.6%)
Total iast_HARDCODED_SECRET_DISABLED 8.919 s 411.723 ms (4.8%)
Total iast_TELEMETRY_OFF 8.925 s 418.068 ms (4.9%)
  • candidate results
Module Variant Duration Δ tracing
Agent tracing 1.061 s -
Agent iast 1.175 s 114.198 ms (10.8%)
Agent iast_HARDCODED_SECRET_DISABLED 1.176 s 114.647 ms (10.8%)
Agent iast_TELEMETRY_OFF 1.18 s 118.427 ms (11.2%)
Total tracing 8.49 s -
Total iast 8.992 s 501.826 ms (5.9%)
Total iast_HARDCODED_SECRET_DISABLED 8.928 s 437.143 ms (5.1%)
Total iast_TELEMETRY_OFF 8.981 s 490.227 ms (5.8%)
gantt
    title insecure-bank - break down per module: candidate=1.36.0-SNAPSHOT~59fca7845d, baseline=1.38.0-SNAPSHOT~0e5e2749b0

    dateFormat X
    axisFormat %s
section tracing
BytebuddyAgent [baseline] (665.189 ms) : 0, 665189
BytebuddyAgent [candidate] (664.505 ms) : 0, 664505
GlobalTracer [baseline] (304.999 ms) : 0, 304999
GlobalTracer [candidate] (304.14 ms) : 0, 304140
AppSec [baseline] (50.151 ms) : 0, 50151
AppSec [candidate] (49.766 ms) : 0, 49766
Remote Config [baseline] (675.368 µs) : 0, 675
Remote Config [candidate] (770.171 µs) : 0, 770
Telemetry [baseline] (7.635 ms) : 0, 7635
Telemetry [candidate] (7.613 ms) : 0, 7613
section iast
BytebuddyAgent [baseline] (779.771 ms) : 0, 779771
BytebuddyAgent [candidate] (783.908 ms) : 0, 783908
GlobalTracer [baseline] (295.45 ms) : 0, 295450
GlobalTracer [candidate] (295.909 ms) : 0, 295909
AppSec [baseline] (48.099 ms) : 0, 48099
AppSec [candidate] (47.231 ms) : 0, 47231
IAST [baseline] (25.318 ms) : 0, 25318
IAST [candidate] (27.346 ms) : 0, 27346
Remote Config [baseline] (576.111 µs) : 0, 576
Remote Config [candidate] (598.809 µs) : 0, 599
Telemetry [baseline] (6.938 ms) : 0, 6938
Telemetry [candidate] (7.016 ms) : 0, 7016
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (780.69 ms) : 0, 780690
BytebuddyAgent [candidate] (783.901 ms) : 0, 783901
GlobalTracer [baseline] (295.904 ms) : 0, 295904
GlobalTracer [candidate] (296.034 ms) : 0, 296034
AppSec [baseline] (47.972 ms) : 0, 47972
AppSec [candidate] (47.202 ms) : 0, 47202
IAST [baseline] (26.013 ms) : 0, 26013
IAST [candidate] (26.771 ms) : 0, 26771
Remote Config [baseline] (562.823 µs) : 0, 563
Remote Config [candidate] (641.982 µs) : 0, 642
Telemetry [baseline] (7.71 ms) : 0, 7710
Telemetry [candidate] (7.821 ms) : 0, 7821
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (776.327 ms) : 0, 776327
BytebuddyAgent [candidate] (785.98 ms) : 0, 785980
GlobalTracer [baseline] (294.518 ms) : 0, 294518
GlobalTracer [candidate] (297.198 ms) : 0, 297198
AppSec [baseline] (47.108 ms) : 0, 47108
AppSec [candidate] (47.535 ms) : 0, 47535
IAST [baseline] (28.309 ms) : 0, 28309
IAST [candidate] (26.559 ms) : 0, 26559
Remote Config [baseline] (574.184 µs) : 0, 574
Remote Config [candidate] (595.138 µs) : 0, 595
Telemetry [baseline] (6.78 ms) : 0, 6780
Telemetry [candidate] (8.204 ms) : 0, 8204
Loading

Load

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
end_time 2024-07-13T20:03:32 2024-07-13T20:10:21
git_branch master nenanoveljic/sqlserver-full
git_commit_date 1720794919 1720899560
git_commit_sha 0e5e274 59fca78
release_version 1.38.0-SNAPSHOT~0e5e2749b0 1.36.0-SNAPSHOT~59fca7845d
start_time 2024-07-13T20:03:19 2024-07-13T20:10:08
See matching parameters
Baseline Candidate
application insecure-bank insecure-bank
ci_job_date 1720901767 1720901767
ci_job_id 571652674 571652674
ci_pipeline_id 39108837 39108837
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 insecure-bank
gantt
    title insecure-bank - request duration [CI 0.99] : candidate=1.36.0-SNAPSHOT~59fca7845d, baseline=1.38.0-SNAPSHOT~0e5e2749b0
    dateFormat X
    axisFormat %s
section baseline
no_agent (375.019 µs) : 353, 397
.   : milestone, 375,
iast (486.205 µs) : 465, 508
.   : milestone, 486,
iast_FULL (546.707 µs) : 526, 568
.   : milestone, 547,
iast_GLOBAL (508.78 µs) : 487, 530
.   : milestone, 509,
iast_HARDCODED_SECRET_DISABLED (479.959 µs) : 459, 501
.   : milestone, 480,
iast_INACTIVE (456.469 µs) : 435, 478
.   : milestone, 456,
iast_TELEMETRY_OFF (473.943 µs) : 452, 496
.   : milestone, 474,
tracing (443.236 µs) : 423, 464
.   : milestone, 443,
section candidate
no_agent (367.971 µs) : 348, 388
.   : milestone, 368,
iast (480.902 µs) : 460, 502
.   : milestone, 481,
iast_FULL (553.5 µs) : 532, 575
.   : milestone, 554,
iast_GLOBAL (509.578 µs) : 488, 531
.   : milestone, 510,
iast_HARDCODED_SECRET_DISABLED (480.594 µs) : 460, 501
.   : milestone, 481,
iast_INACTIVE (458.877 µs) : 437, 481
.   : milestone, 459,
iast_TELEMETRY_OFF (471.615 µs) : 451, 492
.   : milestone, 472,
tracing (441.742 µs) : 421, 462
.   : milestone, 442,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 375.019 µs [353.447 µs, 396.592 µs] -
iast 486.205 µs [464.908 µs, 507.501 µs] 111.185 µs (29.6%)
iast_FULL 546.707 µs [525.694 µs, 567.72 µs] 171.688 µs (45.8%)
iast_GLOBAL 508.78 µs [487.496 µs, 530.064 µs] 133.761 µs (35.7%)
iast_HARDCODED_SECRET_DISABLED 479.959 µs [459.098 µs, 500.82 µs] 104.94 µs (28.0%)
iast_INACTIVE 456.469 µs [435.283 µs, 477.654 µs] 81.449 µs (21.7%)
iast_TELEMETRY_OFF 473.943 µs [452.163 µs, 495.724 µs] 98.924 µs (26.4%)
tracing 443.236 µs [422.504 µs, 463.969 µs] 68.217 µs (18.2%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 367.971 µs [348.274 µs, 387.668 µs] -
iast 480.902 µs [459.748 µs, 502.056 µs] 112.931 µs (30.7%)
iast_FULL 553.5 µs [532.277 µs, 574.723 µs] 185.529 µs (50.4%)
iast_GLOBAL 509.578 µs [487.856 µs, 531.301 µs] 141.607 µs (38.5%)
iast_HARDCODED_SECRET_DISABLED 480.594 µs [459.751 µs, 501.438 µs] 112.623 µs (30.6%)
iast_INACTIVE 458.877 µs [437.084 µs, 480.671 µs] 90.906 µs (24.7%)
iast_TELEMETRY_OFF 471.615 µs [450.754 µs, 492.475 µs] 103.644 µs (28.2%)
tracing 441.742 µs [421.373 µs, 462.111 µs] 73.771 µs (20.0%)
Request duration reports for petclinic
gantt
    title petclinic - request duration [CI 0.99] : candidate=1.36.0-SNAPSHOT~59fca7845d, baseline=1.38.0-SNAPSHOT~0e5e2749b0
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.354 ms) : 1335, 1374
.   : milestone, 1354,
appsec (1.716 ms) : 1692, 1740
.   : milestone, 1716,
appsec_no_iast (1.713 ms) : 1687, 1738
.   : milestone, 1713,
iast (1.477 ms) : 1455, 1500
.   : milestone, 1477,
profiling (1.511 ms) : 1486, 1537
.   : milestone, 1511,
tracing (1.461 ms) : 1437, 1486
.   : milestone, 1461,
section candidate
no_agent (1.365 ms) : 1345, 1386
.   : milestone, 1365,
appsec (1.736 ms) : 1712, 1760
.   : milestone, 1736,
appsec_no_iast (1.724 ms) : 1700, 1748
.   : milestone, 1724,
iast (1.485 ms) : 1463, 1507
.   : milestone, 1485,
profiling (1.494 ms) : 1469, 1518
.   : milestone, 1494,
tracing (1.467 ms) : 1443, 1492
.   : milestone, 1467,
Loading
  • baseline results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.354 ms [1.335 ms, 1.374 ms] -
appsec 1.716 ms [1.692 ms, 1.74 ms] 361.777 µs (26.7%)
appsec_no_iast 1.713 ms [1.687 ms, 1.738 ms] 358.3 µs (26.5%)
iast 1.477 ms [1.455 ms, 1.5 ms] 122.913 µs (9.1%)
profiling 1.511 ms [1.486 ms, 1.537 ms] 157.146 µs (11.6%)
tracing 1.461 ms [1.437 ms, 1.486 ms] 107.215 µs (7.9%)
  • candidate results
Variant Request duration [CI 0.99] Δ no_agent
no_agent 1.365 ms [1.345 ms, 1.386 ms] -
appsec 1.736 ms [1.712 ms, 1.76 ms] 370.519 µs (27.1%)
appsec_no_iast 1.724 ms [1.7 ms, 1.748 ms] 358.358 µs (26.2%)
iast 1.485 ms [1.463 ms, 1.507 ms] 119.967 µs (8.8%)
profiling 1.494 ms [1.469 ms, 1.518 ms] 128.458 µs (9.4%)
tracing 1.467 ms [1.443 ms, 1.492 ms] 102.111 µs (7.5%)

Dacapo

Parameters

Baseline Candidate
baseline_or_candidate baseline candidate
git_branch master nenanoveljic/sqlserver-full
git_commit_date 1720794919 1720899560
git_commit_sha 0e5e274 59fca78
release_version 1.38.0-SNAPSHOT~0e5e2749b0 1.36.0-SNAPSHOT~59fca7845d
See matching parameters
Baseline Candidate
application biojava biojava
ci_job_date 1720902265 1720902265
ci_job_id 571652675 571652675
ci_pipeline_id 39108837 39108837
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.36.0-SNAPSHOT~59fca7845d, baseline=1.38.0-SNAPSHOT~0e5e2749b0
    dateFormat X
    axisFormat %s
section baseline
no_agent (1.467 ms) : 1455, 1478
.   : milestone, 1467,
appsec (2.249 ms) : 2214, 2285
.   : milestone, 2249,
iast (1.968 ms) : 1926, 2010
.   : milestone, 1968,
iast_GLOBAL (2.015 ms) : 1973, 2057
.   : milestone, 2015,
profiling (1.874 ms) : 1840, 1909
.   : milestone, 1874,
tracing (1.855 ms) : 1822, 1888
.   : milestone, 1855,
section candidate
no_agent (1.467 ms) : 1456, 1479
.   : milestone, 1467,
appsec (2.217 ms) : 2184, 2250
.   : milestone, 2217,
iast (1.971 ms) : 1931, 2012
.   : milestone, 1971,
iast_GLOBAL (2.003 ms) : 1964, 2043
.   : milestone, 2003,
profiling (1.842 ms) : 1811, 1874
.   : milestone, 1842,
tracing (1.829 ms) : 1799, 1860
.   : milestone, 1829,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.467 ms [1.455 ms, 1.478 ms] -
appsec 2.249 ms [2.214 ms, 2.285 ms] 782.541 µs (53.3%)
iast 1.968 ms [1.926 ms, 2.01 ms] 500.845 µs (34.1%)
iast_GLOBAL 2.015 ms [1.973 ms, 2.057 ms] 548.207 µs (37.4%)
profiling 1.874 ms [1.84 ms, 1.909 ms] 407.428 µs (27.8%)
tracing 1.855 ms [1.822 ms, 1.888 ms] 388.422 µs (26.5%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 1.467 ms [1.456 ms, 1.479 ms] -
appsec 2.217 ms [2.184 ms, 2.25 ms] 749.207 µs (51.1%)
iast 1.971 ms [1.931 ms, 2.012 ms] 503.977 µs (34.3%)
iast_GLOBAL 2.003 ms [1.964 ms, 2.043 ms] 535.878 µs (36.5%)
profiling 1.842 ms [1.811 ms, 1.874 ms] 375.1 µs (25.6%)
tracing 1.829 ms [1.799 ms, 1.86 ms] 361.832 µs (24.7%)
Execution time for biojava
gantt
    title biojava - execution time [CI 0.99] : candidate=1.36.0-SNAPSHOT~59fca7845d, baseline=1.38.0-SNAPSHOT~0e5e2749b0
    dateFormat X
    axisFormat %s
section baseline
no_agent (15.006 s) : 15006000, 15006000
.   : milestone, 15006000,
appsec (15.347 s) : 15347000, 15347000
.   : milestone, 15347000,
iast (18.666 s) : 18666000, 18666000
.   : milestone, 18666000,
iast_GLOBAL (17.804 s) : 17804000, 17804000
.   : milestone, 17804000,
profiling (15.439 s) : 15439000, 15439000
.   : milestone, 15439000,
tracing (14.858 s) : 14858000, 14858000
.   : milestone, 14858000,
section candidate
no_agent (15.288 s) : 15288000, 15288000
.   : milestone, 15288000,
appsec (14.958 s) : 14958000, 14958000
.   : milestone, 14958000,
iast (18.892 s) : 18892000, 18892000
.   : milestone, 18892000,
iast_GLOBAL (17.734 s) : 17734000, 17734000
.   : milestone, 17734000,
profiling (15.352 s) : 15352000, 15352000
.   : milestone, 15352000,
tracing (14.93 s) : 14930000, 14930000
.   : milestone, 14930000,
Loading
  • baseline results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.006 s [15.006 s, 15.006 s] -
appsec 15.347 s [15.347 s, 15.347 s] 341.0 ms (2.3%)
iast 18.666 s [18.666 s, 18.666 s] 3.66 s (24.4%)
iast_GLOBAL 17.804 s [17.804 s, 17.804 s] 2.798 s (18.6%)
profiling 15.439 s [15.439 s, 15.439 s] 433.0 ms (2.9%)
tracing 14.858 s [14.858 s, 14.858 s] -148.0 ms (-1.0%)
  • candidate results
Variant Execution Time [CI 0.99] Δ no_agent
no_agent 15.288 s [15.288 s, 15.288 s] -
appsec 14.958 s [14.958 s, 14.958 s] -330.0 ms (-2.2%)
iast 18.892 s [18.892 s, 18.892 s] 3.604 s (23.6%)
iast_GLOBAL 17.734 s [17.734 s, 17.734 s] 2.446 s (16.0%)
profiling 15.352 s [15.352 s, 15.352 s] 64.0 ms (0.4%)
tracing 14.93 s [14.93 s, 14.93 s] -358.0 ms (-2.3%)

@nenadnoveljic nenadnoveljic force-pushed the nenanoveljic/sqlserver-full branch 2 times, most recently from 4d0aa82 to 87f47d8 Compare June 14, 2024 14:43
@nenadnoveljic nenadnoveljic marked this pull request as ready for review July 11, 2024 06:26
@nenadnoveljic nenadnoveljic requested review from a team as code owners July 11, 2024 06:26
@nenadnoveljic nenadnoveljic marked this pull request as draft July 11, 2024 06:38
instrumentationStatement.execute(instrumentationSql);
instrumentationStatement.close();
} catch (SQLException e) {
log.warn(
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would avoid to set it as warn. Instead I'd would log as debug and rate limited

Copy link
Author

Choose a reason for hiding this comment

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

Converted to debug now. What technique do you recommend for rate limiting?

Copy link
Collaborator

Choose a reason for hiding this comment

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

There is something that's doing it datadog.trace.relocate.api.RatelimitedLogger but it works for the warn level. It can be perhaps changed to rate limit debugging also. My reason suggesting to avoid warn as level is because it might be interpret by the customer as an issue of their application while it's a message internal of our tracer. Also, an application might do sql query very often. If there is an issue, logging each time will plummet the performances a lot

Copy link
Author

Choose a reason for hiding this comment

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

I changed the level to debug. Do you think I should introduce the rate limiter for the debug level as well?

statement.executeQuery(query)

then:
assert statement.sql == "/*${serviceInjection}*/ ${query}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Would it be possible to add assertions for the spans created as well?

Copy link
Author

@nenadnoveljic nenadnoveljic Jul 11, 2024

Choose a reason for hiding this comment

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

span_id is created in setContextInfo and then started in StatementAdvisor. I don't know how to intercept the call and get the value in any of those places. Unlike in other DBs, span_id/trace_id aren't in the comment. Any ideas I could explore?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I was thinking at using trace assert to test that the set context span is created in the expected order and carries tags you need. A bit like other tests are doing:

Copy link
Author

Choose a reason for hiding this comment

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

The tests you pointed to in your previous message seem to run queries on local databases of type h2, derby, etc. We don't have a SQL Server running locally. Consequently, if we want to make the same end-to-end test with SQL Server, we would need to integrate spinning up a SQL Server docker container in the CI. Do you think that's a good way to proceed?

Copy link
Collaborator

Choose a reason for hiding this comment

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

there is no need to spin a docker container explicitly on the CI. I can suggest using testcontainers to automatically spin a container during the lifetime of the test. (here is an example using postgres:

)

@nenadnoveljic nenadnoveljic marked this pull request as ready for review July 11, 2024 07:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants