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
Fix for MySQL multi-host internally_generated connection urls #6853
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 7 performance regressions! Performance is the same for 36 metrics, 11 unstable metrics.
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.31.0-SNAPSHOT~f987356cbd, baseline=1.32.0-SNAPSHOT~722243d370
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.075 s) : 0, 1074850
Total [baseline] (10.41 s) : 0, 10409545
Agent [candidate] (1.074 s) : 0, 1074261
Total [candidate] (10.475 s) : 0, 10475277
section appsec
Agent [baseline] (1.199 s) : 0, 1198795
Total [baseline] (10.591 s) : 0, 10591170
Agent [candidate] (1.176 s) : 0, 1175750
Total [candidate] (10.446 s) : 0, 10445670
section iast
Agent [baseline] (1.198 s) : 0, 1198137
Total [baseline] (10.791 s) : 0, 10791422
Agent [candidate] (1.2 s) : 0, 1200164
Total [candidate] (10.806 s) : 0, 10806279
section profiling
Agent [baseline] (1.275 s) : 0, 1274521
Total [baseline] (10.638 s) : 0, 10638161
Agent [candidate] (1.276 s) : 0, 1275591
Total [candidate] (10.636 s) : 0, 10636146
gantt
title petclinic - break down per module: candidate=1.31.0-SNAPSHOT~f987356cbd, baseline=1.32.0-SNAPSHOT~722243d370
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (685.603 ms) : 0, 685603
BytebuddyAgent [candidate] (682.806 ms) : 0, 682806
GlobalTracer [baseline] (297.215 ms) : 0, 297215
GlobalTracer [candidate] (297.503 ms) : 0, 297503
AppSec [baseline] (49.325 ms) : 0, 49325
AppSec [candidate] (51.265 ms) : 0, 51265
Remote Config [baseline] (659.668 µs) : 0, 660
Remote Config [candidate] (715.726 µs) : 0, 716
Telemetry [baseline] (7.524 ms) : 0, 7524
Telemetry [candidate] (7.757 ms) : 0, 7757
section appsec
BytebuddyAgent [baseline] (696.754 ms) : 0, 696754
BytebuddyAgent [candidate] (684.773 ms) : 0, 684773
GlobalTracer [baseline] (291.48 ms) : 0, 291480
GlobalTracer [candidate] (297.902 ms) : 0, 297902
AppSec [baseline] (149.795 ms) : 0, 149795
AppSec [candidate] (151.202 ms) : 0, 151202
Remote Config [baseline] (611.834 µs) : 0, 612
Remote Config [candidate] (634.791 µs) : 0, 635
Telemetry [baseline] (6.819 ms) : 0, 6819
Telemetry [candidate] (6.913 ms) : 0, 6913
IAST [baseline] (18.899 ms) : 0, 18899
section iast
BytebuddyAgent [baseline] (794.498 ms) : 0, 794498
BytebuddyAgent [candidate] (793.418 ms) : 0, 793418
GlobalTracer [baseline] (287.89 ms) : 0, 287890
GlobalTracer [candidate] (288.948 ms) : 0, 288948
AppSec [baseline] (49.975 ms) : 0, 49975
AppSec [candidate] (55.823 ms) : 0, 55823
Remote Config [baseline] (570.326 µs) : 0, 570
Remote Config [candidate] (606.482 µs) : 0, 606
Telemetry [baseline] (7.319 ms) : 0, 7319
Telemetry [candidate] (8.103 ms) : 0, 8103
IAST [baseline] (23.569 ms) : 0, 23569
IAST [candidate] (18.914 ms) : 0, 18914
section profiling
BytebuddyAgent [baseline] (681.586 ms) : 0, 681586
BytebuddyAgent [candidate] (678.696 ms) : 0, 678696
GlobalTracer [baseline] (381.884 ms) : 0, 381884
GlobalTracer [candidate] (383.254 ms) : 0, 383254
AppSec [baseline] (50.379 ms) : 0, 50379
AppSec [candidate] (52.808 ms) : 0, 52808
Remote Config [baseline] (708.289 µs) : 0, 708
Remote Config [candidate] (758.053 µs) : 0, 758
Telemetry [baseline] (7.488 ms) : 0, 7488
Telemetry [candidate] (9.707 ms) : 0, 9707
ProfilingAgent [baseline] (95.819 ms) : 0, 95819
ProfilingAgent [candidate] (94.081 ms) : 0, 94081
Profiling [baseline] (95.842 ms) : 0, 95842
Profiling [candidate] (94.104 ms) : 0, 94104
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 14 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.31.0-SNAPSHOT~f987356cbd, baseline=1.32.0-SNAPSHOT~722243d370
dateFormat X
axisFormat %s
section baseline
no_agent (1.347 ms) : 1328, 1366
. : milestone, 1347,
appsec (1.705 ms) : 1680, 1730
. : milestone, 1705,
iast (1.496 ms) : 1473, 1519
. : milestone, 1496,
profiling (1.505 ms) : 1480, 1531
. : milestone, 1505,
tracing (1.483 ms) : 1460, 1507
. : milestone, 1483,
section candidate
no_agent (1.334 ms) : 1315, 1353
. : milestone, 1334,
appsec (1.736 ms) : 1711, 1761
. : milestone, 1736,
iast (1.508 ms) : 1485, 1532
. : milestone, 1508,
profiling (1.497 ms) : 1472, 1521
. : milestone, 1497,
tracing (1.5 ms) : 1476, 1524
. : milestone, 1500,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.31.0-SNAPSHOT~f987356cbd, baseline=1.32.0-SNAPSHOT~722243d370
dateFormat X
axisFormat %s
section baseline
no_agent (365.777 µs) : 346, 386
. : milestone, 366,
iast (474.379 µs) : 454, 495
. : milestone, 474,
iast_FULL (543.228 µs) : 522, 564
. : milestone, 543,
iast_GLOBAL (498.843 µs) : 478, 520
. : milestone, 499,
iast_HARDCODED_SECRET_DISABLED (477.938 µs) : 457, 498
. : milestone, 478,
iast_INACTIVE (454.18 µs) : 433, 475
. : milestone, 454,
iast_TELEMETRY_OFF (473.197 µs) : 452, 494
. : milestone, 473,
tracing (446.163 µs) : 425, 467
. : milestone, 446,
section candidate
no_agent (363.855 µs) : 344, 384
. : milestone, 364,
iast (482.941 µs) : 462, 504
. : milestone, 483,
iast_FULL (534.09 µs) : 513, 555
. : milestone, 534,
iast_GLOBAL (497.384 µs) : 476, 519
. : milestone, 497,
iast_HARDCODED_SECRET_DISABLED (476.246 µs) : 455, 497
. : milestone, 476,
iast_INACTIVE (447.899 µs) : 427, 469
. : milestone, 448,
iast_TELEMETRY_OFF (474.719 µs) : 453, 496
. : milestone, 475,
tracing (444.203 µs) : 423, 465
. : milestone, 444,
|
d804bcf
to
f987356
Compare
This might be good to eventually include in a broader solution covering the variety of unsupported connection URLs I discussed here: |
@@ -824,7 +830,7 @@ public static DBInfo parse(String connectionUrl, final Properties props) { | |||
} | |||
return GENERIC_URL_LIKE.doParse(connectionUrl, parsedProps).build(); | |||
} catch (final Exception e) { | |||
ExceptionLogger.LOGGER.debug("Error parsing URL", e); | |||
ExceptionLogger.LOGGER.debug("Error parsing URL {}", jdbcUrl, e); |
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.
The full URL could contain sensitive details - can we merge the fix first and discuss this logging change separately?
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.
LGTM, but I'd leave the logging change to a separate PR/discussion
This change doesn't seem to be relevant to the broader initiative, since it's not about supporting a different connection URL, but about properly handling connection proxy objects. |
f987356
to
0613d39
Compare
0613d39
to
283ffad
Compare
What Does This Do
Fixes a reported problem when the instrumentation failed to parse MySQL multi-host connection URLs such as
"jdbc:mysql:loadbalance://**internally_generated**1711497942886**"
Uses an original connection URL to extract database information and attaches it to the underlying connection object so that it can be properly propagated and used with and without the split-by-instance setting.
Motivation
Provide a fix for a reported bug to properly extract and store database connection information from the MySQL multi-host connection URL and prevent a parsing exception.
Additional Notes
Jira ticket: APMS-11717