-
Notifications
You must be signed in to change notification settings - Fork 318
Support using the OpenTelemetry API to interact with automatic W3C baggage #9982
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
…ggage Note: custom BaggageEntryMetadata is not supported
Iiuc this is unused by OTel today, is that correct? If so, wdyt about tweaking the wording to be something like the below to avoid confusion of unsupported by us vs unsupported by OTel
|
|
🎯 Code Coverage 🔗 Commit SHA: a460aa2 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
PerfectSlayer
left a comment
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.
Looking good. One minor question about null value.
...agent/agent-otel/otel-shim/src/main/java/datadog/opentelemetry/shim/baggage/OtelBaggage.java
Outdated
Show resolved
Hide resolved
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 57 metrics, 8 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.56.0-SNAPSHOT~a460aa25e9, baseline=1.56.0-SNAPSHOT~d0353e2240
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.104 s) : 0, 1103640
Total [baseline] (8.879 s) : 0, 8879346
Agent [candidate] (1.101 s) : 0, 1100631
Total [candidate] (8.826 s) : 0, 8825650
section iast
Agent [baseline] (1.245 s) : 0, 1244952
Total [baseline] (9.557 s) : 0, 9557236
Agent [candidate] (1.24 s) : 0, 1240316
Total [candidate] (9.578 s) : 0, 9577537
gantt
title insecure-bank - break down per module: candidate=1.56.0-SNAPSHOT~a460aa25e9, baseline=1.56.0-SNAPSHOT~d0353e2240
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.463 ms) : 0, 1463
crashtracking [candidate] (1.465 ms) : 0, 1465
BytebuddyAgent [baseline] (708.429 ms) : 0, 708429
BytebuddyAgent [candidate] (706.798 ms) : 0, 706798
GlobalTracer [baseline] (249.335 ms) : 0, 249335
GlobalTracer [candidate] (248.485 ms) : 0, 248485
AppSec [baseline] (32.804 ms) : 0, 32804
AppSec [candidate] (32.548 ms) : 0, 32548
Debugger [baseline] (64.121 ms) : 0, 64121
Debugger [candidate] (63.923 ms) : 0, 63923
Remote Config [baseline] (643.927 µs) : 0, 644
Remote Config [candidate] (626.871 µs) : 0, 627
Telemetry [baseline] (8.214 ms) : 0, 8214
Telemetry [candidate] (8.26 ms) : 0, 8260
Flare Poller [baseline] (3.721 ms) : 0, 3721
Flare Poller [candidate] (3.698 ms) : 0, 3698
section iast
crashtracking [baseline] (1.471 ms) : 0, 1471
crashtracking [candidate] (1.45 ms) : 0, 1450
BytebuddyAgent [baseline] (835.896 ms) : 0, 835896
BytebuddyAgent [candidate] (832.455 ms) : 0, 832455
GlobalTracer [baseline] (238.745 ms) : 0, 238745
GlobalTracer [candidate] (238.205 ms) : 0, 238205
IAST [baseline] (30.436 ms) : 0, 30436
IAST [candidate] (29.359 ms) : 0, 29359
AppSec [baseline] (31.223 ms) : 0, 31223
AppSec [candidate] (32.134 ms) : 0, 32134
Debugger [baseline] (60.43 ms) : 0, 60430
Debugger [candidate] (60.06 ms) : 0, 60060
Remote Config [baseline] (545.463 µs) : 0, 545
Remote Config [candidate] (548.679 µs) : 0, 549
Telemetry [baseline] (7.711 ms) : 0, 7711
Telemetry [candidate] (7.686 ms) : 0, 7686
Flare Poller [baseline] (3.545 ms) : 0, 3545
Flare Poller [candidate] (3.509 ms) : 0, 3509
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.56.0-SNAPSHOT~a460aa25e9, baseline=1.56.0-SNAPSHOT~d0353e2240
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.106 s) : 0, 1106419
Total [baseline] (10.846 s) : 0, 10846043
Agent [candidate] (1.099 s) : 0, 1098904
Total [candidate] (10.746 s) : 0, 10746266
section appsec
Agent [baseline] (1.276 s) : 0, 1275528
Total [baseline] (11.029 s) : 0, 11029442
Agent [candidate] (1.279 s) : 0, 1279029
Total [candidate] (10.997 s) : 0, 10996566
section iast
Agent [baseline] (1.239 s) : 0, 1239072
Total [baseline] (11.23 s) : 0, 11229798
Agent [candidate] (1.24 s) : 0, 1240117
Total [candidate] (11.173 s) : 0, 11173065
section profiling
Agent [baseline] (1.226 s) : 0, 1225899
Total [baseline] (11.043 s) : 0, 11042734
Agent [candidate] (1.244 s) : 0, 1244030
Total [candidate] (11.188 s) : 0, 11188451
gantt
title petclinic - break down per module: candidate=1.56.0-SNAPSHOT~a460aa25e9, baseline=1.56.0-SNAPSHOT~d0353e2240
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.478 ms) : 0, 1478
crashtracking [candidate] (1.453 ms) : 0, 1453
BytebuddyAgent [baseline] (710.791 ms) : 0, 710791
BytebuddyAgent [candidate] (705.854 ms) : 0, 705854
GlobalTracer [baseline] (249.726 ms) : 0, 249726
GlobalTracer [candidate] (248.114 ms) : 0, 248114
AppSec [baseline] (32.497 ms) : 0, 32497
AppSec [candidate] (32.118 ms) : 0, 32118
Debugger [baseline] (64.399 ms) : 0, 64399
Debugger [candidate] (64.256 ms) : 0, 64256
Remote Config [baseline] (637.803 µs) : 0, 638
Remote Config [candidate] (625.493 µs) : 0, 625
Telemetry [baseline] (8.251 ms) : 0, 8251
Telemetry [candidate] (8.068 ms) : 0, 8068
Flare Poller [baseline] (3.761 ms) : 0, 3761
Flare Poller [candidate] (3.617 ms) : 0, 3617
section appsec
crashtracking [baseline] (1.459 ms) : 0, 1459
crashtracking [candidate] (1.451 ms) : 0, 1451
BytebuddyAgent [baseline] (727.434 ms) : 0, 727434
BytebuddyAgent [candidate] (730.253 ms) : 0, 730253
GlobalTracer [baseline] (239.877 ms) : 0, 239877
GlobalTracer [candidate] (240.027 ms) : 0, 240027
IAST [baseline] (24.713 ms) : 0, 24713
IAST [candidate] (24.784 ms) : 0, 24784
AppSec [baseline] (173.512 ms) : 0, 173512
AppSec [candidate] (173.783 ms) : 0, 173783
Debugger [baseline] (60.969 ms) : 0, 60969
Debugger [candidate] (60.737 ms) : 0, 60737
Remote Config [baseline] (698.855 µs) : 0, 699
Remote Config [candidate] (663.138 µs) : 0, 663
Telemetry [baseline] (8.166 ms) : 0, 8166
Telemetry [candidate] (8.42 ms) : 0, 8420
Flare Poller [baseline] (3.776 ms) : 0, 3776
Flare Poller [candidate] (3.897 ms) : 0, 3897
section iast
crashtracking [baseline] (1.455 ms) : 0, 1455
crashtracking [candidate] (1.449 ms) : 0, 1449
BytebuddyAgent [baseline] (830.269 ms) : 0, 830269
BytebuddyAgent [candidate] (830.588 ms) : 0, 830588
GlobalTracer [baseline] (238.47 ms) : 0, 238470
GlobalTracer [candidate] (238.558 ms) : 0, 238558
IAST [baseline] (30.011 ms) : 0, 30011
IAST [candidate] (29.4 ms) : 0, 29400
AppSec [baseline] (31.324 ms) : 0, 31324
AppSec [candidate] (32.292 ms) : 0, 32292
Debugger [baseline] (60.899 ms) : 0, 60899
Debugger [candidate] (61.244 ms) : 0, 61244
Remote Config [baseline] (550.704 µs) : 0, 551
Remote Config [candidate] (544.068 µs) : 0, 544
Telemetry [baseline] (7.741 ms) : 0, 7741
Telemetry [candidate] (7.659 ms) : 0, 7659
Flare Poller [baseline] (3.503 ms) : 0, 3503
Flare Poller [candidate] (3.494 ms) : 0, 3494
section profiling
crashtracking [baseline] (1.436 ms) : 0, 1436
crashtracking [candidate] (1.464 ms) : 0, 1464
BytebuddyAgent [baseline] (729.133 ms) : 0, 729133
BytebuddyAgent [candidate] (739.714 ms) : 0, 739714
GlobalTracer [baseline] (221.79 ms) : 0, 221790
GlobalTracer [candidate] (225.022 ms) : 0, 225022
AppSec [baseline] (32.102 ms) : 0, 32102
AppSec [candidate] (32.679 ms) : 0, 32679
Debugger [baseline] (62.896 ms) : 0, 62896
Debugger [candidate] (63.677 ms) : 0, 63677
Remote Config [baseline] (633.181 µs) : 0, 633
Remote Config [candidate] (668.282 µs) : 0, 668
Telemetry [baseline] (7.879 ms) : 0, 7879
Telemetry [candidate] (8.096 ms) : 0, 8096
Flare Poller [baseline] (3.729 ms) : 0, 3729
Flare Poller [candidate] (3.854 ms) : 0, 3854
ProfilingAgent [baseline] (96.797 ms) : 0, 96797
ProfilingAgent [candidate] (98.339 ms) : 0, 98339
Profiling [baseline] (97.377 ms) : 0, 97377
Profiling [candidate] (98.934 ms) : 0, 98934
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 18 metrics, 17 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~a460aa25e9, baseline=1.56.0-SNAPSHOT~d0353e2240
dateFormat X
axisFormat %s
section baseline
no_agent (17.398 ms) : 17221, 17576
. : milestone, 17398,
appsec (18.87 ms) : 18677, 19063
. : milestone, 18870,
code_origins (17.964 ms) : 17784, 18143
. : milestone, 17964,
iast (17.779 ms) : 17603, 17955
. : milestone, 17779,
profiling (18.854 ms) : 18664, 19043
. : milestone, 18854,
tracing (17.559 ms) : 17387, 17731
. : milestone, 17559,
section candidate
no_agent (18.133 ms) : 17943, 18323
. : milestone, 18133,
appsec (19.578 ms) : 19380, 19776
. : milestone, 19578,
code_origins (17.677 ms) : 17504, 17850
. : milestone, 17677,
iast (17.936 ms) : 17756, 18115
. : milestone, 17936,
profiling (18.68 ms) : 18493, 18868
. : milestone, 18680,
tracing (17.551 ms) : 17377, 17725
. : milestone, 17551,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.56.0-SNAPSHOT~a460aa25e9, baseline=1.56.0-SNAPSHOT~d0353e2240
dateFormat X
axisFormat %s
section baseline
no_agent (1.183 ms) : 1172, 1195
. : milestone, 1183,
iast (3.365 ms) : 3266, 3465
. : milestone, 3365,
iast_FULL (5.908 ms) : 5848, 5968
. : milestone, 5908,
iast_GLOBAL (3.665 ms) : 3607, 3722
. : milestone, 3665,
profiling (2.098 ms) : 2080, 2116
. : milestone, 2098,
tracing (1.843 ms) : 1828, 1859
. : milestone, 1843,
section candidate
no_agent (1.189 ms) : 1177, 1200
. : milestone, 1189,
iast (3.353 ms) : 3290, 3415
. : milestone, 3353,
iast_FULL (5.707 ms) : 5651, 5763
. : milestone, 5707,
iast_GLOBAL (3.53 ms) : 3469, 3592
. : milestone, 3530,
profiling (2.164 ms) : 2144, 2184
. : milestone, 2164,
tracing (1.793 ms) : 1778, 1808
. : milestone, 1793,
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.56.0-SNAPSHOT~a460aa25e9, baseline=1.56.0-SNAPSHOT~d0353e2240
dateFormat X
axisFormat %s
section baseline
no_agent (1.477 ms) : 1466, 1489
. : milestone, 1477,
appsec (3.718 ms) : 3499, 3937
. : milestone, 3718,
iast (2.215 ms) : 2151, 2279
. : milestone, 2215,
iast_GLOBAL (2.264 ms) : 2199, 2329
. : milestone, 2264,
profiling (2.054 ms) : 2002, 2106
. : milestone, 2054,
tracing (2.046 ms) : 1995, 2096
. : milestone, 2046,
section candidate
no_agent (1.474 ms) : 1463, 1486
. : milestone, 1474,
appsec (3.706 ms) : 3488, 3923
. : milestone, 3706,
iast (2.212 ms) : 2148, 2277
. : milestone, 2212,
iast_GLOBAL (2.262 ms) : 2198, 2326
. : milestone, 2262,
profiling (2.053 ms) : 2001, 2104
. : milestone, 2053,
tracing (2.038 ms) : 1988, 2089
. : milestone, 2038,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.56.0-SNAPSHOT~a460aa25e9, baseline=1.56.0-SNAPSHOT~d0353e2240
dateFormat X
axisFormat %s
section baseline
no_agent (14.898 s) : 14898000, 14898000
. : milestone, 14898000,
appsec (14.808 s) : 14808000, 14808000
. : milestone, 14808000,
iast (18.588 s) : 18588000, 18588000
. : milestone, 18588000,
iast_GLOBAL (17.941 s) : 17941000, 17941000
. : milestone, 17941000,
profiling (14.978 s) : 14978000, 14978000
. : milestone, 14978000,
tracing (14.757 s) : 14757000, 14757000
. : milestone, 14757000,
section candidate
no_agent (15.254 s) : 15254000, 15254000
. : milestone, 15254000,
appsec (14.778 s) : 14778000, 14778000
. : milestone, 14778000,
iast (17.954 s) : 17954000, 17954000
. : milestone, 17954000,
iast_GLOBAL (17.84 s) : 17840000, 17840000
. : milestone, 17840000,
profiling (14.815 s) : 14815000, 14815000
. : milestone, 14815000,
tracing (14.481 s) : 14481000, 14481000
. : milestone, 14481000,
|
| public datadog.trace.bootstrap.instrumentation.api.Baggage asAgentBaggage() { | ||
| return delegate; | ||
| } |
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.
❓ This isn't a function that OTel has in their spec right?
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.
correct - it is used to access the underlying Datadog baggage when the wrapper is "made current" using the OTel context API (i.e. for round-tripping purposes)
PS. the name is deliberate to match the asAgentSpan method in the OtelSpan wrapper.
What Does This Do
Supports interoperability between Datadog baggage used for W3C propagation, and the OpenTelemetry Baggage API.
Motivation
Some users want to augment W3C baggage using custom instrumentation.
Additional Notes
Custom
BaggageEntryMetadatais not yet used in OpenTelemetry (src) so it is not supported as part of this PR.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: APMAPI-1754