Open
Conversation
…ame into dddbs and dddb SQL comment tags instead of the generic type string and null
Contributor
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 64 metrics, 7 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~48487e281e, baseline=1.61.0-SNAPSHOT~1d0b64dbdb
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.073 s) : 0, 1073232
Total [baseline] (11.179 s) : 0, 11179222
Agent [candidate] (1.06 s) : 0, 1059502
Total [candidate] (10.965 s) : 0, 10964704
section appsec
Agent [baseline] (1.252 s) : 0, 1252314
Total [baseline] (11.186 s) : 0, 11186390
Agent [candidate] (1.244 s) : 0, 1243951
Total [candidate] (11.061 s) : 0, 11060705
section iast
Agent [baseline] (1.225 s) : 0, 1225312
Total [baseline] (11.296 s) : 0, 11296264
Agent [candidate] (1.225 s) : 0, 1224926
Total [candidate] (11.253 s) : 0, 11252545
section profiling
Agent [baseline] (1.181 s) : 0, 1180756
Total [baseline] (11.059 s) : 0, 11058994
Agent [candidate] (1.182 s) : 0, 1181590
Total [candidate] (11.038 s) : 0, 11038240
gantt
title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~48487e281e, baseline=1.61.0-SNAPSHOT~1d0b64dbdb
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.215 ms) : 0, 1215
crashtracking [candidate] (1.19 ms) : 0, 1190
BytebuddyAgent [baseline] (636.733 ms) : 0, 636733
BytebuddyAgent [candidate] (629.049 ms) : 0, 629049
AgentMeter [baseline] (29.517 ms) : 0, 29517
AgentMeter [candidate] (29.052 ms) : 0, 29052
GlobalTracer [baseline] (259.61 ms) : 0, 259610
GlobalTracer [candidate] (257.452 ms) : 0, 257452
AppSec [baseline] (31.941 ms) : 0, 31941
AppSec [candidate] (31.451 ms) : 0, 31451
Debugger [baseline] (60.24 ms) : 0, 60240
Debugger [candidate] (59.333 ms) : 0, 59333
Remote Config [baseline] (615.862 µs) : 0, 616
Remote Config [candidate] (614.879 µs) : 0, 615
Telemetry [baseline] (8.765 ms) : 0, 8765
Telemetry [candidate] (8.7 ms) : 0, 8700
Flare Poller [baseline] (8.212 ms) : 0, 8212
Flare Poller [candidate] (6.577 ms) : 0, 6577
section appsec
crashtracking [baseline] (1.203 ms) : 0, 1203
crashtracking [candidate] (1.193 ms) : 0, 1193
BytebuddyAgent [baseline] (661.36 ms) : 0, 661360
BytebuddyAgent [candidate] (656.867 ms) : 0, 656867
AgentMeter [baseline] (12.083 ms) : 0, 12083
AgentMeter [candidate] (12.05 ms) : 0, 12050
GlobalTracer [baseline] (259.289 ms) : 0, 259289
GlobalTracer [candidate] (257.777 ms) : 0, 257777
AppSec [baseline] (178.242 ms) : 0, 178242
AppSec [candidate] (177.181 ms) : 0, 177181
Debugger [baseline] (66.39 ms) : 0, 66390
Debugger [candidate] (65.435 ms) : 0, 65435
Remote Config [baseline] (570.423 µs) : 0, 570
Remote Config [candidate] (572.644 µs) : 0, 573
Telemetry [baseline] (9.031 ms) : 0, 9031
Telemetry [candidate] (8.996 ms) : 0, 8996
Flare Poller [baseline] (3.654 ms) : 0, 3654
Flare Poller [candidate] (3.611 ms) : 0, 3611
IAST [baseline] (24.129 ms) : 0, 24129
IAST [candidate] (24.006 ms) : 0, 24006
section iast
crashtracking [baseline] (1.182 ms) : 0, 1182
crashtracking [candidate] (1.195 ms) : 0, 1195
BytebuddyAgent [baseline] (795.005 ms) : 0, 795005
BytebuddyAgent [candidate] (794.361 ms) : 0, 794361
AgentMeter [baseline] (11.31 ms) : 0, 11310
AgentMeter [candidate] (11.297 ms) : 0, 11297
GlobalTracer [baseline] (247.076 ms) : 0, 247076
GlobalTracer [candidate] (246.73 ms) : 0, 246730
AppSec [baseline] (26.358 ms) : 0, 26358
AppSec [candidate] (26.431 ms) : 0, 26431
Debugger [baseline] (64.49 ms) : 0, 64490
Debugger [candidate] (64.866 ms) : 0, 64866
Remote Config [baseline] (514.176 µs) : 0, 514
Remote Config [candidate] (522.587 µs) : 0, 523
Telemetry [baseline] (13.621 ms) : 0, 13621
Telemetry [candidate] (13.774 ms) : 0, 13774
Flare Poller [baseline] (4.621 ms) : 0, 4621
Flare Poller [candidate] (4.587 ms) : 0, 4587
IAST [baseline] (25.09 ms) : 0, 25090
IAST [candidate] (25.098 ms) : 0, 25098
section profiling
ProfilingAgent [baseline] (94.219 ms) : 0, 94219
ProfilingAgent [candidate] (93.975 ms) : 0, 93975
crashtracking [baseline] (1.17 ms) : 0, 1170
crashtracking [candidate] (1.163 ms) : 0, 1163
BytebuddyAgent [baseline] (681.155 ms) : 0, 681155
BytebuddyAgent [candidate] (682.031 ms) : 0, 682031
AgentMeter [baseline] (8.66 ms) : 0, 8660
AgentMeter [candidate] (8.673 ms) : 0, 8673
GlobalTracer [baseline] (215.503 ms) : 0, 215503
GlobalTracer [candidate] (215.54 ms) : 0, 215540
AppSec [baseline] (31.87 ms) : 0, 31870
AppSec [candidate] (32.041 ms) : 0, 32041
Debugger [baseline] (63.565 ms) : 0, 63565
Debugger [candidate] (64.455 ms) : 0, 64455
Remote Config [baseline] (576.534 µs) : 0, 577
Remote Config [candidate] (575.7 µs) : 0, 576
Telemetry [baseline] (8.987 ms) : 0, 8987
Telemetry [candidate] (8.908 ms) : 0, 8908
Flare Poller [baseline] (4.28 ms) : 0, 4280
Flare Poller [candidate] (3.497 ms) : 0, 3497
Profiling [baseline] (94.781 ms) : 0, 94781
Profiling [candidate] (94.536 ms) : 0, 94536
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~48487e281e, baseline=1.61.0-SNAPSHOT~1d0b64dbdb
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.061 s) : 0, 1061195
Total [baseline] (8.81 s) : 0, 8810065
Agent [candidate] (1.06 s) : 0, 1060460
Total [candidate] (8.828 s) : 0, 8828226
section iast
Agent [baseline] (1.225 s) : 0, 1225364
Total [baseline] (9.576 s) : 0, 9575687
Agent [candidate] (1.225 s) : 0, 1224889
Total [candidate] (9.569 s) : 0, 9568675
gantt
title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~48487e281e, baseline=1.61.0-SNAPSHOT~1d0b64dbdb
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.22 ms) : 0, 1220
crashtracking [candidate] (1.207 ms) : 0, 1207
BytebuddyAgent [baseline] (630.445 ms) : 0, 630445
BytebuddyAgent [candidate] (628.36 ms) : 0, 628360
AgentMeter [baseline] (29.168 ms) : 0, 29168
AgentMeter [candidate] (29.057 ms) : 0, 29057
GlobalTracer [baseline] (257.633 ms) : 0, 257633
GlobalTracer [candidate] (257.671 ms) : 0, 257671
AppSec [baseline] (31.694 ms) : 0, 31694
AppSec [candidate] (31.566 ms) : 0, 31566
Debugger [baseline] (58.947 ms) : 0, 58947
Debugger [candidate] (58.719 ms) : 0, 58719
Remote Config [baseline] (621.443 µs) : 0, 621
Remote Config [candidate] (603.632 µs) : 0, 604
Telemetry [baseline] (8.749 ms) : 0, 8749
Telemetry [candidate] (8.625 ms) : 0, 8625
Flare Poller [baseline] (6.45 ms) : 0, 6450
Flare Poller [candidate] (8.666 ms) : 0, 8666
section iast
crashtracking [baseline] (1.197 ms) : 0, 1197
crashtracking [candidate] (1.196 ms) : 0, 1196
BytebuddyAgent [baseline] (794.118 ms) : 0, 794118
BytebuddyAgent [candidate] (793.849 ms) : 0, 793849
AgentMeter [baseline] (11.342 ms) : 0, 11342
AgentMeter [candidate] (11.312 ms) : 0, 11312
GlobalTracer [baseline] (247.25 ms) : 0, 247250
GlobalTracer [candidate] (247.3 ms) : 0, 247300
IAST [baseline] (25.199 ms) : 0, 25199
IAST [candidate] (25.105 ms) : 0, 25105
AppSec [baseline] (27.299 ms) : 0, 27299
AppSec [candidate] (26.377 ms) : 0, 26377
Debugger [baseline] (62.444 ms) : 0, 62444
Debugger [candidate] (63.213 ms) : 0, 63213
Remote Config [baseline] (514.179 µs) : 0, 514
Remote Config [candidate] (524.381 µs) : 0, 524
Telemetry [baseline] (14.94 ms) : 0, 14940
Telemetry [candidate] (15.056 ms) : 0, 15056
Flare Poller [baseline] (4.907 ms) : 0, 4907
Flare Poller [candidate] (4.909 ms) : 0, 4909
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 1 performance regressions! Performance is the same for 18 metrics, 16 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~48487e281e, baseline=1.61.0-SNAPSHOT~1d0b64dbdb
dateFormat X
axisFormat %s
section baseline
no_agent (1.165 ms) : 1153, 1176
. : milestone, 1165,
iast (3.154 ms) : 3110, 3198
. : milestone, 3154,
iast_FULL (5.776 ms) : 5719, 5834
. : milestone, 5776,
iast_GLOBAL (3.633 ms) : 3577, 3689
. : milestone, 3633,
profiling (2.089 ms) : 2070, 2107
. : milestone, 2089,
tracing (1.744 ms) : 1730, 1759
. : milestone, 1744,
section candidate
no_agent (1.17 ms) : 1158, 1181
. : milestone, 1170,
iast (3.14 ms) : 3099, 3181
. : milestone, 3140,
iast_FULL (5.858 ms) : 5798, 5918
. : milestone, 5858,
iast_GLOBAL (3.514 ms) : 3457, 3572
. : milestone, 3514,
profiling (2.181 ms) : 2162, 2201
. : milestone, 2181,
tracing (1.804 ms) : 1790, 1819
. : milestone, 1804,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~48487e281e, baseline=1.61.0-SNAPSHOT~1d0b64dbdb
dateFormat X
axisFormat %s
section baseline
no_agent (17.1 ms) : 16933, 17266
. : milestone, 17100,
appsec (18.607 ms) : 18413, 18801
. : milestone, 18607,
code_origins (17.562 ms) : 17389, 17736
. : milestone, 17562,
iast (17.953 ms) : 17774, 18133
. : milestone, 17953,
profiling (18.933 ms) : 18744, 19122
. : milestone, 18933,
tracing (17.938 ms) : 17760, 18115
. : milestone, 17938,
section candidate
no_agent (17.862 ms) : 17680, 18044
. : milestone, 17862,
appsec (18.806 ms) : 18615, 18997
. : milestone, 18806,
code_origins (17.866 ms) : 17689, 18043
. : milestone, 17866,
iast (18.105 ms) : 17926, 18285
. : milestone, 18105,
profiling (19.945 ms) : 19742, 20148
. : milestone, 19945,
tracing (17.787 ms) : 17611, 17964
. : milestone, 17787,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~48487e281e, baseline=1.61.0-SNAPSHOT~1d0b64dbdb
dateFormat X
axisFormat %s
section baseline
no_agent (14.994 s) : 14994000, 14994000
. : milestone, 14994000,
appsec (15.011 s) : 15011000, 15011000
. : milestone, 15011000,
iast (18.059 s) : 18059000, 18059000
. : milestone, 18059000,
iast_GLOBAL (17.889 s) : 17889000, 17889000
. : milestone, 17889000,
profiling (15.368 s) : 15368000, 15368000
. : milestone, 15368000,
tracing (15.319 s) : 15319000, 15319000
. : milestone, 15319000,
section candidate
no_agent (15.324 s) : 15324000, 15324000
. : milestone, 15324000,
appsec (15.038 s) : 15038000, 15038000
. : milestone, 15038000,
iast (17.695 s) : 17695000, 17695000
. : milestone, 17695000,
iast_GLOBAL (17.463 s) : 17463000, 17463000
. : milestone, 17463000,
profiling (15.032 s) : 15032000, 15032000
. : milestone, 15032000,
tracing (15.196 s) : 15196000, 15196000
. : milestone, 15196000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~48487e281e, baseline=1.61.0-SNAPSHOT~1d0b64dbdb
dateFormat X
axisFormat %s
section baseline
no_agent (1.473 ms) : 1461, 1484
. : milestone, 1473,
appsec (3.744 ms) : 3526, 3962
. : milestone, 3744,
iast (2.265 ms) : 2194, 2335
. : milestone, 2265,
iast_GLOBAL (2.307 ms) : 2237, 2378
. : milestone, 2307,
profiling (2.482 ms) : 2326, 2637
. : milestone, 2482,
tracing (2.07 ms) : 2015, 2124
. : milestone, 2070,
section candidate
no_agent (1.472 ms) : 1460, 1483
. : milestone, 1472,
appsec (3.803 ms) : 3582, 4024
. : milestone, 3803,
iast (2.254 ms) : 2184, 2324
. : milestone, 2254,
iast_GLOBAL (2.304 ms) : 2234, 2375
. : milestone, 2304,
profiling (2.082 ms) : 2027, 2138
. : milestone, 2082,
tracing (2.065 ms) : 2011, 2119
. : milestone, 2065,
|
Author
|
@codex review |
|
To use Codex here, create a Codex account and connect to github. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Does This Do
Fix Oracle DBM trace correlation by injecting the database instance name into dddbs and dddb SQL comment tags instead of the generic type string and null.
Motivation
https://datadoghq.atlassian.net/browse/SDBM-2434
On the APM service page, Oracle-backed services show broken DBM trace correlation:
Checked the oracle integration and backend pipeline are correct. The Java tracer is injecting the wrong values.
Root cause
Two bugs in the SQL comment injection path:
Bug 1 — dddbs='oracle' instead of the instance name:
getDbService() called dbService(type, instance) which, when split-by-instance=false (the default), ignores the
instance name and returns the type-based cache entry ("oracle").
Bug 2 — dddb always absent:
Both injection sites passed dbInfo.getDb() for the dddb tag. For Oracle, the JDBC URL parser sets instance only —
getDb() is always null — so dddb was silently skipped by SQLCommenter.
Fix
type-based naming cache. Uses getInstance() (not the dbInstance() fallback to getDb()) so databases like SQL Server
that carry identity in getDb() are unaffected.
db).
span.getServiceName()); dddb now uses DECORATE.getDbInstance(dbInfo) (was dbInfo.getDb()).
Result
Oracle connections now inject:
/ddps='my-service',dddbs='freepdb1',ddh='localhost',dddb='freepdb1'/
instead of:
/ddps='my-service',dddbs='oracle',ddh='localhost'/
Testing
correct comment format against a mock Oracle connection.
container (Testcontainers), runs a query, then queries v$sql as system to verify the exact SQL text Oracle received
contains dddbs='freepdb1' and dddb='freepdb1' and does not contain dddbs='oracle'.
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: https://datadoghq.atlassian.net/browse/SDBM-2434
Note: Once your PR is ready to merge, add it to the merge queue by commenting
/merge./merge -ccancels the queue request./merge -f --reason "reason"skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.