-
Notifications
You must be signed in to change notification settings - Fork 315
Fixed OpenTelemetry span events #9864
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: 65a896d | 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.55.0-SNAPSHOT~65a896d6a4, baseline=1.55.0-SNAPSHOT~8747faa1b4
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.03 s) : 0, 1029841
Total [baseline] (8.705 s) : 0, 8705256
Agent [candidate] (1.03 s) : 0, 1030385
Total [candidate] (8.625 s) : 0, 8624966
section iast
Agent [baseline] (1.174 s) : 0, 1173948
Total [baseline] (9.378 s) : 0, 9377710
Agent [candidate] (1.161 s) : 0, 1161095
Total [candidate] (9.327 s) : 0, 9326907
gantt
title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~65a896d6a4, baseline=1.55.0-SNAPSHOT~8747faa1b4
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.468 ms) : 0, 1468
crashtracking [candidate] (1.453 ms) : 0, 1453
BytebuddyAgent [baseline] (701.679 ms) : 0, 701679
BytebuddyAgent [candidate] (702.82 ms) : 0, 702820
GlobalTracer [baseline] (245.001 ms) : 0, 245001
GlobalTracer [candidate] (244.819 ms) : 0, 244819
AppSec [baseline] (32.266 ms) : 0, 32266
AppSec [candidate] (32.23 ms) : 0, 32230
Debugger [baseline] (6.381 ms) : 0, 6381
Debugger [candidate] (6.371 ms) : 0, 6371
Remote Config [baseline] (688.149 µs) : 0, 688
Remote Config [candidate] (668.306 µs) : 0, 668
Telemetry [baseline] (13.912 ms) : 0, 13912
Telemetry [candidate] (14.392 ms) : 0, 14392
Flare Poller [baseline] (7.308 ms) : 0, 7308
Flare Poller [candidate] (6.466 ms) : 0, 6466
section iast
crashtracking [baseline] (1.485 ms) : 0, 1485
crashtracking [candidate] (1.466 ms) : 0, 1466
BytebuddyAgent [baseline] (832.087 ms) : 0, 832087
BytebuddyAgent [candidate] (824.07 ms) : 0, 824070
GlobalTracer [baseline] (236.6 ms) : 0, 236600
GlobalTracer [candidate] (233.654 ms) : 0, 233654
IAST [baseline] (31.459 ms) : 0, 31459
IAST [candidate] (32.329 ms) : 0, 32329
AppSec [baseline] (31.201 ms) : 0, 31201
AppSec [candidate] (28.971 ms) : 0, 28971
Debugger [baseline] (6.196 ms) : 0, 6196
Debugger [candidate] (6.126 ms) : 0, 6126
Remote Config [baseline] (607.492 µs) : 0, 607
Remote Config [candidate] (599.782 µs) : 0, 600
Telemetry [baseline] (8.62 ms) : 0, 8620
Telemetry [candidate] (8.464 ms) : 0, 8464
Flare Poller [baseline] (4.141 ms) : 0, 4141
Flare Poller [candidate] (4.147 ms) : 0, 4147
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~65a896d6a4, baseline=1.55.0-SNAPSHOT~8747faa1b4
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.032 s) : 0, 1031538
Total [baseline] (10.796 s) : 0, 10796150
Agent [candidate] (1.029 s) : 0, 1029223
Total [candidate] (10.755 s) : 0, 10754699
section appsec
Agent [baseline] (1.201 s) : 0, 1200523
Total [baseline] (10.92 s) : 0, 10920032
Agent [candidate] (1.205 s) : 0, 1204769
Total [candidate] (10.961 s) : 0, 10960995
section iast
Agent [baseline] (1.176 s) : 0, 1176034
Total [baseline] (11.199 s) : 0, 11198778
Agent [candidate] (1.158 s) : 0, 1158302
Total [candidate] (11.021 s) : 0, 11021187
section profiling
Agent [baseline] (1.171 s) : 0, 1171066
Total [baseline] (10.812 s) : 0, 10812054
Agent [candidate] (1.181 s) : 0, 1181351
Total [candidate] (10.864 s) : 0, 10863708
gantt
title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~65a896d6a4, baseline=1.55.0-SNAPSHOT~8747faa1b4
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.462 ms) : 0, 1462
crashtracking [candidate] (1.485 ms) : 0, 1485
BytebuddyAgent [baseline] (703.72 ms) : 0, 703720
BytebuddyAgent [candidate] (701.775 ms) : 0, 701775
GlobalTracer [baseline] (244.907 ms) : 0, 244907
GlobalTracer [candidate] (244.541 ms) : 0, 244541
AppSec [baseline] (32.278 ms) : 0, 32278
AppSec [candidate] (32.348 ms) : 0, 32348
Debugger [baseline] (6.379 ms) : 0, 6379
Debugger [candidate] (6.38 ms) : 0, 6380
Remote Config [baseline] (676.164 µs) : 0, 676
Remote Config [candidate] (670.852 µs) : 0, 671
Telemetry [baseline] (12.865 ms) : 0, 12865
Telemetry [candidate] (15.046 ms) : 0, 15046
Flare Poller [baseline] (7.997 ms) : 0, 7997
Flare Poller [candidate] (5.684 ms) : 0, 5684
section appsec
crashtracking [baseline] (1.458 ms) : 0, 1458
crashtracking [candidate] (1.466 ms) : 0, 1466
BytebuddyAgent [baseline] (724.88 ms) : 0, 724880
BytebuddyAgent [candidate] (726.224 ms) : 0, 726224
GlobalTracer [baseline] (235.716 ms) : 0, 235716
GlobalTracer [candidate] (237.293 ms) : 0, 237293
AppSec [baseline] (173.5 ms) : 0, 173500
AppSec [candidate] (174.301 ms) : 0, 174301
Debugger [baseline] (5.876 ms) : 0, 5876
Debugger [candidate] (6.009 ms) : 0, 6009
Remote Config [baseline] (628.368 µs) : 0, 628
Remote Config [candidate] (633.305 µs) : 0, 633
Telemetry [baseline] (8.406 ms) : 0, 8406
Telemetry [candidate] (8.469 ms) : 0, 8469
Flare Poller [baseline] (3.882 ms) : 0, 3882
Flare Poller [candidate] (3.908 ms) : 0, 3908
IAST [baseline] (25.037 ms) : 0, 25037
IAST [candidate] (25.303 ms) : 0, 25303
section iast
crashtracking [baseline] (1.506 ms) : 0, 1506
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (834.31 ms) : 0, 834310
BytebuddyAgent [candidate] (821.179 ms) : 0, 821179
GlobalTracer [baseline] (236.627 ms) : 0, 236627
GlobalTracer [candidate] (233.809 ms) : 0, 233809
AppSec [baseline] (30.948 ms) : 0, 30948
AppSec [candidate] (27.098 ms) : 0, 27098
Debugger [baseline] (6.19 ms) : 0, 6190
Debugger [candidate] (6.202 ms) : 0, 6202
Remote Config [baseline] (617.536 µs) : 0, 618
Remote Config [candidate] (597.411 µs) : 0, 597
Telemetry [baseline] (8.671 ms) : 0, 8671
Telemetry [candidate] (8.474 ms) : 0, 8474
Flare Poller [baseline] (4.172 ms) : 0, 4172
Flare Poller [candidate] (4.121 ms) : 0, 4121
IAST [baseline] (31.507 ms) : 0, 31507
IAST [candidate] (34.153 ms) : 0, 34153
section profiling
ProfilingAgent [baseline] (109.153 ms) : 0, 109153
ProfilingAgent [candidate] (110.002 ms) : 0, 110002
crashtracking [baseline] (1.448 ms) : 0, 1448
crashtracking [candidate] (1.457 ms) : 0, 1457
BytebuddyAgent [baseline] (725.024 ms) : 0, 725024
BytebuddyAgent [candidate] (731.704 ms) : 0, 731704
GlobalTracer [baseline] (220.083 ms) : 0, 220083
GlobalTracer [candidate] (221.958 ms) : 0, 221958
AppSec [baseline] (32.286 ms) : 0, 32286
AppSec [candidate] (33.389 ms) : 0, 33389
Debugger [baseline] (11.445 ms) : 0, 11445
Debugger [candidate] (13.077 ms) : 0, 13077
Remote Config [baseline] (706.519 µs) : 0, 707
Remote Config [candidate] (714.384 µs) : 0, 714
Telemetry [baseline] (11.416 ms) : 0, 11416
Telemetry [candidate] (9.012 ms) : 0, 9012
Flare Poller [baseline] (4.109 ms) : 0, 4109
Flare Poller [candidate] (4.169 ms) : 0, 4169
Profiling [baseline] (109.784 ms) : 0, 109784
Profiling [candidate] (110.636 ms) : 0, 110636
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.55.0-SNAPSHOT~65a896d6a4, baseline=1.55.0-SNAPSHOT~8747faa1b4
dateFormat X
axisFormat %s
section baseline
no_agent (18.314 ms) : 18118, 18510
. : milestone, 18314,
appsec (19.956 ms) : 19748, 20164
. : milestone, 19956,
code_origins (18.412 ms) : 18223, 18602
. : milestone, 18412,
iast (17.906 ms) : 17729, 18084
. : milestone, 17906,
profiling (20.857 ms) : 20642, 21073
. : milestone, 20857,
tracing (18.271 ms) : 18088, 18455
. : milestone, 18271,
section candidate
no_agent (17.31 ms) : 17135, 17485
. : milestone, 17310,
appsec (20.319 ms) : 20108, 20530
. : milestone, 20319,
code_origins (19.486 ms) : 19295, 19677
. : milestone, 19486,
iast (17.579 ms) : 17405, 17753
. : milestone, 17579,
profiling (20.241 ms) : 20042, 20440
. : milestone, 20241,
tracing (19.307 ms) : 19112, 19503
. : milestone, 19307,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~65a896d6a4, baseline=1.55.0-SNAPSHOT~8747faa1b4
dateFormat X
axisFormat %s
section baseline
no_agent (1.181 ms) : 1170, 1193
. : milestone, 1181,
iast (3.151 ms) : 3109, 3193
. : milestone, 3151,
iast_FULL (5.782 ms) : 5724, 5839
. : milestone, 5782,
iast_GLOBAL (3.546 ms) : 3494, 3597
. : milestone, 3546,
profiling (2.129 ms) : 2109, 2150
. : milestone, 2129,
tracing (1.714 ms) : 1701, 1727
. : milestone, 1714,
section candidate
no_agent (1.178 ms) : 1166, 1189
. : milestone, 1178,
iast (3.247 ms) : 3201, 3292
. : milestone, 3247,
iast_FULL (5.692 ms) : 5635, 5748
. : milestone, 5692,
iast_GLOBAL (3.653 ms) : 3596, 3710
. : milestone, 3653,
profiling (1.962 ms) : 1946, 1979
. : milestone, 1962,
tracing (1.8 ms) : 1785, 1815
. : milestone, 1800,
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 tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~65a896d6a4, baseline=1.55.0-SNAPSHOT~8747faa1b4
dateFormat X
axisFormat %s
section baseline
no_agent (1.484 ms) : 1473, 1496
. : milestone, 1484,
appsec (3.739 ms) : 3519, 3958
. : milestone, 3739,
iast (2.218 ms) : 2154, 2282
. : milestone, 2218,
iast_GLOBAL (2.267 ms) : 2204, 2331
. : milestone, 2267,
profiling (2.094 ms) : 2040, 2147
. : milestone, 2094,
tracing (2.048 ms) : 1999, 2098
. : milestone, 2048,
section candidate
no_agent (1.485 ms) : 1473, 1496
. : milestone, 1485,
appsec (3.733 ms) : 3514, 3952
. : milestone, 3733,
iast (2.225 ms) : 2161, 2289
. : milestone, 2225,
iast_GLOBAL (2.286 ms) : 2222, 2351
. : milestone, 2286,
profiling (2.088 ms) : 2035, 2141
. : milestone, 2088,
tracing (2.047 ms) : 1997, 2096
. : milestone, 2047,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~65a896d6a4, baseline=1.55.0-SNAPSHOT~8747faa1b4
dateFormat X
axisFormat %s
section baseline
no_agent (14.835 s) : 14835000, 14835000
. : milestone, 14835000,
appsec (14.859 s) : 14859000, 14859000
. : milestone, 14859000,
iast (18.5 s) : 18500000, 18500000
. : milestone, 18500000,
iast_GLOBAL (18.051 s) : 18051000, 18051000
. : milestone, 18051000,
profiling (15.183 s) : 15183000, 15183000
. : milestone, 15183000,
tracing (15.168 s) : 15168000, 15168000
. : milestone, 15168000,
section candidate
no_agent (15.416 s) : 15416000, 15416000
. : milestone, 15416000,
appsec (15.027 s) : 15027000, 15027000
. : milestone, 15027000,
iast (18.475 s) : 18475000, 18475000
. : milestone, 18475000,
iast_GLOBAL (18.064 s) : 18064000, 18064000
. : milestone, 18064000,
profiling (15.577 s) : 15577000, 15577000
. : milestone, 15577000,
tracing (15.441 s) : 15441000, 15441000
. : milestone, 15441000,
|
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.
Left few minor comments.
| @@ -0,0 +1,5 @@ | |||
| package datadog.trace.bootstrap.instrumentation.api; | |||
|
|
|||
| public interface SpanWrapper { | |||
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.
🎯 suggestion: Can we document the purpose of the interface?
🎯 suggestion: Can we make it @FunctionalInterface too to make sure it does not grew unexpectedly for now?
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.
Done
| package datadog.trace.bootstrap.instrumentation.api; | ||
|
|
||
| public interface SpanWrapper { | ||
| void onSpanFinished(); |
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.
❔ question: To avoid all the empty implementation, should we make it default?
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.
Thanks, done!
|
|
||
| @Override | ||
| public void attachWrapper(Object wrapper) { | ||
| public void attachWrapper(SpanWrapper wrapper) { |
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.
🎯 suggestion: Can we add @NonNull to keep it for the interface definition?
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.
Done!
706e308 to
9ee6982
Compare
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.
👏 praise: Looking good! Thanks for the follow up changes 👍
52eb181 to
4ff2348
Compare
4ff2348 to
50a6840
Compare
50a6840 to
31e38f0
Compare
31e38f0 to
d93c9d6
Compare
What Does This Do
Fixed missing event processing for OpenTelemetry spans. Since
OTelSpanwrapsDDSpan, event serialization didn’t always happen. Now, events are processed reliably at the finalization stage whenDDSpanis finished, andDDSpan.finishAndAddToTrace()triggers a cascading finish for wrapper spans.Issue happens when span created with annotations
@Traceor@WithSpan.Motivation
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]