-
Couldn't load subscription status.
- Fork 315
Add option to JDBC instrumentation to always append DBM comment #9798
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 option to JDBC instrumentation to always append DBM comment #9798
Conversation
...ent/instrumentation/jdbc/src/main/java/datadog/trace/instrumentation/jdbc/JDBCDecorator.java
Outdated
Show resolved
Hide resolved
...src/main/java/datadog/trace/instrumentation/jdbc/DBMCompatibleConnectionInstrumentation.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good to me, just a small comment about documentation.
|
🎯 Code Coverage 🔗 Commit SHA: cb11be8 | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 53 metrics, 12 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~cb11be8e16, baseline=1.55.0-SNAPSHOT~9fb4984267
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.034 s) : 0, 1033636
Total [baseline] (10.845 s) : 0, 10845287
Agent [candidate] (1.033 s) : 0, 1032986
Total [candidate] (10.872 s) : 0, 10872238
section appsec
Agent [baseline] (1.206 s) : 0, 1206043
Total [baseline] (11.01 s) : 0, 11009833
Agent [candidate] (1.212 s) : 0, 1211736
Total [candidate] (10.944 s) : 0, 10943918
section iast
Agent [baseline] (1.187 s) : 0, 1187140
Total [baseline] (11.274 s) : 0, 11274076
Agent [candidate] (1.169 s) : 0, 1169392
Total [candidate] (11.232 s) : 0, 11232038
section profiling
Agent [baseline] (1.179 s) : 0, 1178581
Total [baseline] (10.988 s) : 0, 10987712
Agent [candidate] (1.181 s) : 0, 1180735
Total [candidate] (10.954 s) : 0, 10954245
gantt
title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~cb11be8e16, baseline=1.55.0-SNAPSHOT~9fb4984267
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.472 ms) : 0, 1472
crashtracking [candidate] (1.456 ms) : 0, 1456
BytebuddyAgent [baseline] (704.918 ms) : 0, 704918
BytebuddyAgent [candidate] (702.991 ms) : 0, 702991
GlobalTracer [baseline] (245.653 ms) : 0, 245653
GlobalTracer [candidate] (246.282 ms) : 0, 246282
AppSec [baseline] (32.42 ms) : 0, 32420
AppSec [candidate] (32.557 ms) : 0, 32557
Debugger [baseline] (6.417 ms) : 0, 6417
Debugger [candidate] (6.454 ms) : 0, 6454
Remote Config [baseline] (679.893 µs) : 0, 680
Remote Config [candidate] (678.8 µs) : 0, 679
Telemetry [baseline] (15.187 ms) : 0, 15187
Telemetry [candidate] (14.655 ms) : 0, 14655
Flare Poller [baseline] (5.629 ms) : 0, 5629
Flare Poller [candidate] (6.583 ms) : 0, 6583
section appsec
crashtracking [baseline] (1.472 ms) : 0, 1472
crashtracking [candidate] (1.487 ms) : 0, 1487
BytebuddyAgent [baseline] (728.54 ms) : 0, 728540
BytebuddyAgent [candidate] (731.259 ms) : 0, 731259
GlobalTracer [baseline] (236.491 ms) : 0, 236491
GlobalTracer [candidate] (238.119 ms) : 0, 238119
IAST [baseline] (25.053 ms) : 0, 25053
IAST [candidate] (25.306 ms) : 0, 25306
AppSec [baseline] (174.472 ms) : 0, 174472
AppSec [candidate] (175.28 ms) : 0, 175280
Debugger [baseline] (5.909 ms) : 0, 5909
Debugger [candidate] (5.956 ms) : 0, 5956
Remote Config [baseline] (634.346 µs) : 0, 634
Remote Config [candidate] (628.451 µs) : 0, 628
Telemetry [baseline] (8.435 ms) : 0, 8435
Telemetry [candidate] (8.514 ms) : 0, 8514
Flare Poller [baseline] (3.848 ms) : 0, 3848
Flare Poller [candidate] (3.952 ms) : 0, 3952
section iast
crashtracking [baseline] (1.499 ms) : 0, 1499
crashtracking [candidate] (1.479 ms) : 0, 1479
BytebuddyAgent [baseline] (843.496 ms) : 0, 843496
BytebuddyAgent [candidate] (831.031 ms) : 0, 831031
GlobalTracer [baseline] (237.743 ms) : 0, 237743
GlobalTracer [candidate] (234.034 ms) : 0, 234034
IAST [baseline] (33.311 ms) : 0, 33311
IAST [candidate] (31.789 ms) : 0, 31789
AppSec [baseline] (29.429 ms) : 0, 29429
AppSec [candidate] (30.094 ms) : 0, 30094
Debugger [baseline] (6.21 ms) : 0, 6210
Debugger [candidate] (6.132 ms) : 0, 6132
Remote Config [baseline] (625.712 µs) : 0, 626
Remote Config [candidate] (594.676 µs) : 0, 595
Telemetry [baseline] (8.676 ms) : 0, 8676
Telemetry [candidate] (8.511 ms) : 0, 8511
Flare Poller [baseline] (4.158 ms) : 0, 4158
Flare Poller [candidate] (4.115 ms) : 0, 4115
section profiling
crashtracking [baseline] (1.479 ms) : 0, 1479
crashtracking [candidate] (1.452 ms) : 0, 1452
BytebuddyAgent [baseline] (729.52 ms) : 0, 729520
BytebuddyAgent [candidate] (732.124 ms) : 0, 732124
GlobalTracer [baseline] (221.978 ms) : 0, 221978
GlobalTracer [candidate] (221.083 ms) : 0, 221083
AppSec [baseline] (32.354 ms) : 0, 32354
AppSec [candidate] (32.531 ms) : 0, 32531
Debugger [baseline] (13.048 ms) : 0, 13048
Debugger [candidate] (11.466 ms) : 0, 11466
Remote Config [baseline] (717.789 µs) : 0, 718
Remote Config [candidate] (2.097 ms) : 0, 2097
Telemetry [baseline] (9.84 ms) : 0, 9840
Telemetry [candidate] (9.95 ms) : 0, 9950
Flare Poller [baseline] (4.147 ms) : 0, 4147
Flare Poller [candidate] (4.094 ms) : 0, 4094
ProfilingAgent [baseline] (109.996 ms) : 0, 109996
ProfilingAgent [candidate] (110.259 ms) : 0, 110259
Profiling [baseline] (110.643 ms) : 0, 110643
Profiling [candidate] (110.895 ms) : 0, 110895
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~cb11be8e16, baseline=1.55.0-SNAPSHOT~9fb4984267
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.034 s) : 0, 1034366
Total [baseline] (8.704 s) : 0, 8704218
Agent [candidate] (1.04 s) : 0, 1039546
Total [candidate] (8.718 s) : 0, 8717863
section iast
Agent [baseline] (1.165 s) : 0, 1164510
Total [baseline] (9.391 s) : 0, 9391293
Agent [candidate] (1.163 s) : 0, 1162579
Total [candidate] (9.353 s) : 0, 9352842
gantt
title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~cb11be8e16, baseline=1.55.0-SNAPSHOT~9fb4984267
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.472 ms) : 0, 1472
crashtracking [candidate] (1.471 ms) : 0, 1471
BytebuddyAgent [baseline] (705.396 ms) : 0, 705396
BytebuddyAgent [candidate] (708.77 ms) : 0, 708770
GlobalTracer [baseline] (245.862 ms) : 0, 245862
GlobalTracer [candidate] (247.17 ms) : 0, 247170
AppSec [baseline] (32.245 ms) : 0, 32245
AppSec [candidate] (32.711 ms) : 0, 32711
Debugger [baseline] (6.414 ms) : 0, 6414
Debugger [candidate] (6.505 ms) : 0, 6505
Remote Config [baseline] (678.022 µs) : 0, 678
Remote Config [candidate] (686.799 µs) : 0, 687
Telemetry [baseline] (15.342 ms) : 0, 15342
Telemetry [candidate] (13.63 ms) : 0, 13630
Flare Poller [baseline] (5.741 ms) : 0, 5741
Flare Poller [candidate] (7.296 ms) : 0, 7296
section iast
crashtracking [baseline] (1.473 ms) : 0, 1473
crashtracking [candidate] (1.473 ms) : 0, 1473
BytebuddyAgent [baseline] (826.298 ms) : 0, 826298
BytebuddyAgent [candidate] (825.149 ms) : 0, 825149
GlobalTracer [baseline] (234.62 ms) : 0, 234620
GlobalTracer [candidate] (233.964 ms) : 0, 233964
IAST [baseline] (31.749 ms) : 0, 31749
IAST [candidate] (32.812 ms) : 0, 32812
AppSec [baseline] (29.758 ms) : 0, 29758
AppSec [candidate] (28.853 ms) : 0, 28853
Debugger [baseline] (6.039 ms) : 0, 6039
Debugger [candidate] (6.035 ms) : 0, 6035
Remote Config [baseline] (595.449 µs) : 0, 595
Remote Config [candidate] (594.522 µs) : 0, 595
Telemetry [baseline] (8.397 ms) : 0, 8397
Telemetry [candidate] (8.376 ms) : 0, 8376
Flare Poller [baseline] (4.146 ms) : 0, 4146
Flare Poller [candidate] (4.108 ms) : 0, 4108
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 2 performance regressions! Performance is the same for 8 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~cb11be8e16, baseline=1.55.0-SNAPSHOT~9fb4984267
dateFormat X
axisFormat %s
section baseline
no_agent (1.216 ms) : 1204, 1228
. : milestone, 1216,
iast (3.286 ms) : 3244, 3327
. : milestone, 3286,
iast_FULL (5.694 ms) : 5638, 5750
. : milestone, 5694,
iast_GLOBAL (3.5 ms) : 3450, 3551
. : milestone, 3500,
profiling (2.028 ms) : 2010, 2046
. : milestone, 2028,
tracing (1.868 ms) : 1851, 1885
. : milestone, 1868,
section candidate
no_agent (1.217 ms) : 1205, 1229
. : milestone, 1217,
iast (3.183 ms) : 3143, 3223
. : milestone, 3183,
iast_FULL (5.684 ms) : 5628, 5739
. : milestone, 5684,
iast_GLOBAL (3.675 ms) : 3607, 3743
. : milestone, 3675,
profiling (2.085 ms) : 2067, 2104
. : milestone, 2085,
tracing (1.793 ms) : 1777, 1808
. : milestone, 1793,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~cb11be8e16, baseline=1.55.0-SNAPSHOT~9fb4984267
dateFormat X
axisFormat %s
section baseline
no_agent (18.084 ms) : 17899, 18270
. : milestone, 18084,
appsec (19.554 ms) : 19351, 19757
. : milestone, 19554,
code_origins (19.584 ms) : 19386, 19782
. : milestone, 19584,
iast (18.857 ms) : 18664, 19049
. : milestone, 18857,
profiling (19.083 ms) : 18890, 19275
. : milestone, 19083,
tracing (19.422 ms) : 19230, 19615
. : milestone, 19422,
section candidate
no_agent (19.025 ms) : 18831, 19220
. : milestone, 19025,
appsec (18.396 ms) : 18212, 18579
. : milestone, 18396,
code_origins (19.669 ms) : 19476, 19862
. : milestone, 19669,
iast (18.597 ms) : 18408, 18787
. : milestone, 18597,
profiling (19.481 ms) : 19284, 19678
. : milestone, 19481,
tracing (19.53 ms) : 19336, 19723
. : milestone, 19530,
DacapoParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 0 unstable metrics.
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~cb11be8e16, baseline=1.55.0-SNAPSHOT~9fb4984267
dateFormat X
axisFormat %s
section baseline
no_agent (15.013 s) : 15013000, 15013000
. : milestone, 15013000,
appsec (14.871 s) : 14871000, 14871000
. : milestone, 14871000,
iast (18.53 s) : 18530000, 18530000
. : milestone, 18530000,
iast_GLOBAL (17.923 s) : 17923000, 17923000
. : milestone, 17923000,
profiling (15.499 s) : 15499000, 15499000
. : milestone, 15499000,
tracing (15.265 s) : 15265000, 15265000
. : milestone, 15265000,
section candidate
no_agent (14.994 s) : 14994000, 14994000
. : milestone, 14994000,
appsec (14.847 s) : 14847000, 14847000
. : milestone, 14847000,
iast (18.523 s) : 18523000, 18523000
. : milestone, 18523000,
iast_GLOBAL (18.043 s) : 18043000, 18043000
. : milestone, 18043000,
profiling (15.143 s) : 15143000, 15143000
. : milestone, 15143000,
tracing (15.133 s) : 15133000, 15133000
. : milestone, 15133000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~cb11be8e16, baseline=1.55.0-SNAPSHOT~9fb4984267
dateFormat X
axisFormat %s
section baseline
no_agent (1.473 ms) : 1462, 1485
. : milestone, 1473,
appsec (3.649 ms) : 3437, 3861
. : milestone, 3649,
iast (2.208 ms) : 2145, 2271
. : milestone, 2208,
iast_GLOBAL (2.248 ms) : 2184, 2311
. : milestone, 2248,
profiling (2.046 ms) : 1995, 2097
. : milestone, 2046,
tracing (2.016 ms) : 1967, 2065
. : milestone, 2016,
section candidate
no_agent (1.473 ms) : 1462, 1485
. : milestone, 1473,
appsec (2.495 ms) : 2442, 2549
. : milestone, 2495,
iast (2.206 ms) : 2142, 2269
. : milestone, 2206,
iast_GLOBAL (2.247 ms) : 2183, 2311
. : milestone, 2247,
profiling (2.057 ms) : 2005, 2109
. : milestone, 2057,
tracing (2.023 ms) : 1973, 2072
. : milestone, 2023,
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I'm fine with the change as is. The optimizations would be nice, but I don't think they are essential.
1ef5195 to
4914d8a
Compare
39e9ee9 to
3b66f40
Compare
|
@dougqh @mhlidd the check-big-regressions check is currently broken, and it seems to not be related to my PR. Should I ignore it? |
This has been flaky for a while :/, rebasing with master should fix it.
Yes! The goal is for devs to document new configs that are added as you have the most information regarding it. |
74eec2e to
cb11be8
Compare
What Does This Do
This PR adds a new option to the JDBC instrumentation. This option allows to always append the comment injected when DBM trace propagation is enabled.
Motivation
This is useful to add supports to GCP’s Query Insights on Cloud SQL. When query insights is enabled, it is prepending a comment to all the queries executed. If another comment exists, it can't recognize its own comment.
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any useful labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: DBMON-5791 APMS-17494