-
Notifications
You must be signed in to change notification settings - Fork 320
Migrate JDBC instrumentation to singleSpanBuilder #9927
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
Conversation
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
|
🎯 Code Coverage 🔗 Commit SHA: 7918e69 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 54 metrics, 11 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.56.0-SNAPSHOT~7918e69524, baseline=1.56.0-SNAPSHOT~7aef6ed5f2
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.047 s) : 0, 1046944
Total [baseline] (8.654 s) : 0, 8654238
Agent [candidate] (1.069 s) : 0, 1068526
Total [candidate] (8.758 s) : 0, 8757936
section iast
Agent [baseline] (1.179 s) : 0, 1179292
Total [baseline] (9.271 s) : 0, 9270919
Agent [candidate] (1.179 s) : 0, 1178756
Total [candidate] (9.273 s) : 0, 9273185
gantt
title insecure-bank - break down per module: candidate=1.56.0-SNAPSHOT~7918e69524, baseline=1.56.0-SNAPSHOT~7aef6ed5f2
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.459 ms) : 0, 1459
crashtracking [candidate] (1.479 ms) : 0, 1479
BytebuddyAgent [baseline] (704.479 ms) : 0, 704479
BytebuddyAgent [candidate] (717.701 ms) : 0, 717701
GlobalTracer [baseline] (245.66 ms) : 0, 245660
GlobalTracer [candidate] (251.466 ms) : 0, 251466
AppSec [baseline] (32.501 ms) : 0, 32501
AppSec [candidate] (33.518 ms) : 0, 33518
Debugger [baseline] (6.436 ms) : 0, 6436
Debugger [candidate] (6.707 ms) : 0, 6707
Remote Config [baseline] (716.395 µs) : 0, 716
Remote Config [candidate] (723.451 µs) : 0, 723
Telemetry [baseline] (14.464 ms) : 0, 14464
Telemetry [candidate] (13.462 ms) : 0, 13462
Flare Poller [baseline] (6.553 ms) : 0, 6553
Flare Poller [candidate] (8.304 ms) : 0, 8304
section iast
crashtracking [baseline] (1.473 ms) : 0, 1473
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (827.372 ms) : 0, 827372
BytebuddyAgent [candidate] (827.745 ms) : 0, 827745
GlobalTracer [baseline] (234.961 ms) : 0, 234961
GlobalTracer [candidate] (234.463 ms) : 0, 234463
AppSec [baseline] (28.68 ms) : 0, 28680
AppSec [candidate] (28.652 ms) : 0, 28652
Debugger [baseline] (6.008 ms) : 0, 6008
Debugger [candidate] (5.988 ms) : 0, 5988
Remote Config [baseline] (609.0 µs) : 0, 609
Remote Config [candidate] (603.861 µs) : 0, 604
Telemetry [baseline] (8.428 ms) : 0, 8428
Telemetry [candidate] (8.454 ms) : 0, 8454
Flare Poller [baseline] (4.087 ms) : 0, 4087
Flare Poller [candidate] (4.101 ms) : 0, 4101
IAST [baseline] (32.854 ms) : 0, 32854
IAST [candidate] (32.521 ms) : 0, 32521
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.56.0-SNAPSHOT~7918e69524, baseline=1.56.0-SNAPSHOT~7aef6ed5f2
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.058 s) : 0, 1058019
Total [baseline] (10.925 s) : 0, 10925334
Agent [candidate] (1.054 s) : 0, 1054453
Total [candidate] (10.861 s) : 0, 10861052
section appsec
Agent [baseline] (1.222 s) : 0, 1222162
Total [baseline] (10.914 s) : 0, 10913772
Agent [candidate] (1.225 s) : 0, 1225145
Total [candidate] (10.899 s) : 0, 10899070
section iast
Agent [baseline] (1.183 s) : 0, 1183358
Total [baseline] (11.233 s) : 0, 11233406
Agent [candidate] (1.18 s) : 0, 1180409
Total [candidate] (11.223 s) : 0, 11222788
section profiling
Agent [baseline] (1.195 s) : 0, 1194774
Total [baseline] (10.874 s) : 0, 10874327
Agent [candidate] (1.197 s) : 0, 1197105
Total [candidate] (10.926 s) : 0, 10925750
gantt
title petclinic - break down per module: candidate=1.56.0-SNAPSHOT~7918e69524, baseline=1.56.0-SNAPSHOT~7aef6ed5f2
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.475 ms) : 0, 1475
crashtracking [candidate] (1.477 ms) : 0, 1477
BytebuddyAgent [baseline] (713.076 ms) : 0, 713076
BytebuddyAgent [candidate] (710.994 ms) : 0, 710994
GlobalTracer [baseline] (247.888 ms) : 0, 247888
GlobalTracer [candidate] (246.389 ms) : 0, 246389
AppSec [baseline] (32.469 ms) : 0, 32469
AppSec [candidate] (32.504 ms) : 0, 32504
Debugger [baseline] (6.406 ms) : 0, 6406
Debugger [candidate] (6.411 ms) : 0, 6411
Remote Config [baseline] (723.479 µs) : 0, 723
Remote Config [candidate] (706.173 µs) : 0, 706
Telemetry [baseline] (15.178 ms) : 0, 15178
Telemetry [candidate] (13.815 ms) : 0, 13815
Flare Poller [baseline] (5.87 ms) : 0, 5870
Flare Poller [candidate] (7.245 ms) : 0, 7245
section appsec
crashtracking [baseline] (1.459 ms) : 0, 1459
crashtracking [candidate] (1.462 ms) : 0, 1462
BytebuddyAgent [baseline] (729.403 ms) : 0, 729403
BytebuddyAgent [candidate] (730.674 ms) : 0, 730674
GlobalTracer [baseline] (237.776 ms) : 0, 237776
GlobalTracer [candidate] (238.478 ms) : 0, 238478
AppSec [baseline] (174.65 ms) : 0, 174650
AppSec [candidate] (175.342 ms) : 0, 175342
Debugger [baseline] (6.07 ms) : 0, 6070
Debugger [candidate] (6.003 ms) : 0, 6003
Remote Config [baseline] (655.8 µs) : 0, 656
Remote Config [candidate] (656.276 µs) : 0, 656
Telemetry [baseline] (8.534 ms) : 0, 8534
Telemetry [candidate] (8.614 ms) : 0, 8614
Flare Poller [baseline] (3.984 ms) : 0, 3984
Flare Poller [candidate] (4.004 ms) : 0, 4004
IAST [baseline] (24.728 ms) : 0, 24728
IAST [candidate] (24.921 ms) : 0, 24921
section iast
crashtracking [baseline] (1.466 ms) : 0, 1466
crashtracking [candidate] (1.465 ms) : 0, 1465
BytebuddyAgent [baseline] (830.399 ms) : 0, 830399
BytebuddyAgent [candidate] (828.857 ms) : 0, 828857
GlobalTracer [baseline] (235.918 ms) : 0, 235918
GlobalTracer [candidate] (235.015 ms) : 0, 235015
AppSec [baseline] (30.575 ms) : 0, 30575
AppSec [candidate] (27.787 ms) : 0, 27787
Debugger [baseline] (6.006 ms) : 0, 6006
Debugger [candidate] (5.988 ms) : 0, 5988
Remote Config [baseline] (599.526 µs) : 0, 600
Remote Config [candidate] (603.572 µs) : 0, 604
Telemetry [baseline] (8.443 ms) : 0, 8443
Telemetry [candidate] (8.362 ms) : 0, 8362
Flare Poller [baseline] (4.208 ms) : 0, 4208
Flare Poller [candidate] (4.173 ms) : 0, 4173
IAST [baseline] (30.863 ms) : 0, 30863
IAST [candidate] (33.358 ms) : 0, 33358
section profiling
crashtracking [baseline] (1.448 ms) : 0, 1448
crashtracking [candidate] (1.454 ms) : 0, 1454
BytebuddyAgent [baseline] (730.241 ms) : 0, 730241
BytebuddyAgent [candidate] (730.82 ms) : 0, 730820
GlobalTracer [baseline] (222.235 ms) : 0, 222235
GlobalTracer [candidate] (222.526 ms) : 0, 222526
AppSec [baseline] (32.214 ms) : 0, 32214
AppSec [candidate] (32.367 ms) : 0, 32367
Debugger [baseline] (7.412 ms) : 0, 7412
Debugger [candidate] (6.704 ms) : 0, 6704
Remote Config [baseline] (702.816 µs) : 0, 703
Remote Config [candidate] (1.444 ms) : 0, 1444
Telemetry [baseline] (15.226 ms) : 0, 15226
Telemetry [candidate] (15.705 ms) : 0, 15705
Flare Poller [baseline] (4.097 ms) : 0, 4097
Flare Poller [candidate] (4.207 ms) : 0, 4207
ProfilingAgent [baseline] (111.16 ms) : 0, 111160
ProfilingAgent [candidate] (111.936 ms) : 0, 111936
Profiling [baseline] (111.828 ms) : 0, 111828
Profiling [candidate] (112.615 ms) : 0, 112615
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 3 performance regressions! Performance is the same for 7 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~7918e69524, baseline=1.56.0-SNAPSHOT~7aef6ed5f2
dateFormat X
axisFormat %s
section baseline
no_agent (19.128 ms) : 18931, 19326
. : milestone, 19128,
appsec (18.288 ms) : 18103, 18473
. : milestone, 18288,
code_origins (17.597 ms) : 17422, 17773
. : milestone, 17597,
iast (18.607 ms) : 18422, 18792
. : milestone, 18607,
profiling (18.661 ms) : 18475, 18847
. : milestone, 18661,
tracing (17.931 ms) : 17749, 18114
. : milestone, 17931,
section candidate
no_agent (18.099 ms) : 17911, 18288
. : milestone, 18099,
appsec (18.224 ms) : 18039, 18409
. : milestone, 18224,
code_origins (17.74 ms) : 17562, 17918
. : milestone, 17740,
iast (17.869 ms) : 17691, 18048
. : milestone, 17869,
profiling (18.917 ms) : 18728, 19105
. : milestone, 18917,
tracing (17.702 ms) : 17528, 17876
. : milestone, 17702,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~7918e69524, baseline=1.56.0-SNAPSHOT~7aef6ed5f2
dateFormat X
axisFormat %s
section baseline
no_agent (1.168 ms) : 1156, 1179
. : milestone, 1168,
iast (3.258 ms) : 3208, 3308
. : milestone, 3258,
iast_FULL (5.777 ms) : 5719, 5835
. : milestone, 5777,
iast_GLOBAL (3.595 ms) : 3543, 3647
. : milestone, 3595,
profiling (1.912 ms) : 1896, 1928
. : milestone, 1912,
tracing (1.867 ms) : 1851, 1883
. : milestone, 1867,
section candidate
no_agent (1.248 ms) : 1234, 1261
. : milestone, 1248,
iast (3.304 ms) : 3259, 3349
. : milestone, 3304,
iast_FULL (5.939 ms) : 5880, 5998
. : milestone, 5939,
iast_GLOBAL (3.728 ms) : 3667, 3789
. : milestone, 3728,
profiling (2.058 ms) : 2038, 2078
. : milestone, 2058,
tracing (1.881 ms) : 1865, 1897
. : milestone, 1881,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.56.0-SNAPSHOT~7918e69524, baseline=1.56.0-SNAPSHOT~7aef6ed5f2
dateFormat X
axisFormat %s
section baseline
no_agent (15.55 s) : 15550000, 15550000
. : milestone, 15550000,
appsec (15.012 s) : 15012000, 15012000
. : milestone, 15012000,
iast (18.299 s) : 18299000, 18299000
. : milestone, 18299000,
iast_GLOBAL (17.992 s) : 17992000, 17992000
. : milestone, 17992000,
profiling (15.346 s) : 15346000, 15346000
. : milestone, 15346000,
tracing (14.591 s) : 14591000, 14591000
. : milestone, 14591000,
section candidate
no_agent (15.34 s) : 15340000, 15340000
. : milestone, 15340000,
appsec (14.831 s) : 14831000, 14831000
. : milestone, 14831000,
iast (18.529 s) : 18529000, 18529000
. : milestone, 18529000,
iast_GLOBAL (18.055 s) : 18055000, 18055000
. : milestone, 18055000,
profiling (15.559 s) : 15559000, 15559000
. : milestone, 15559000,
tracing (14.629 s) : 14629000, 14629000
. : milestone, 14629000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.56.0-SNAPSHOT~7918e69524, baseline=1.56.0-SNAPSHOT~7aef6ed5f2
dateFormat X
axisFormat %s
section baseline
no_agent (1.472 ms) : 1461, 1484
. : milestone, 1472,
appsec (3.711 ms) : 3490, 3932
. : milestone, 3711,
iast (2.204 ms) : 2140, 2268
. : milestone, 2204,
iast_GLOBAL (2.25 ms) : 2186, 2314
. : milestone, 2250,
profiling (2.056 ms) : 2004, 2108
. : milestone, 2056,
tracing (2.025 ms) : 1975, 2074
. : milestone, 2025,
section candidate
no_agent (1.471 ms) : 1459, 1482
. : milestone, 1471,
appsec (3.641 ms) : 3429, 3854
. : milestone, 3641,
iast (2.208 ms) : 2144, 2272
. : milestone, 2208,
iast_GLOBAL (2.249 ms) : 2185, 2313
. : milestone, 2249,
profiling (2.079 ms) : 2026, 2132
. : milestone, 2079,
tracing (2.028 ms) : 1978, 2078
. : milestone, 2028,
|
| return buildSpan(DEFAULT_INSTRUMENTATION_NAME, spanName); | ||
| } | ||
|
|
||
| @Deprecated |
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.
❓ Should this method be marked as deprecated even though it was just introduced?
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.
Yes, that's deliberate. Ideally, we want instrumentations to be setting instrumentation name, but I decided to handle that separately.
What Does This Do
Updating JDBC instrumentation to use singleSpanBuilder instead of buildSpan
Motivation
Replaces calls to buildSpan with singleSpanBuilder
Each call to singleSpanBuilder is only allowed build s single span, but that allows the underlying SpanBuilder to be reused
SpanBuilder reuse reduces allocation leading to less garbage collection overhead
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: [PROJ-IDENT]