Add OTEL_TRACES_EXPORTER=otlp configuration#10877
Conversation
| public static final String OTLP_METRICS_TEMPORALITY_PREFERENCE = | ||
| "otlp.metrics.temporality.preference"; | ||
|
|
||
| public static final String OTEL_TRACES_EXPORTER = "otel.traces.exporter"; |
There was a problem hiding this comment.
Lets use this as our internal key
public static final String TRACE_OTEL_EXPORTER = "trace.otel.exporter";
This matches better with the TRACE_OTEL_ENABLED key
There was a problem hiding this comment.
Doesn't the value need to be the actual property, though?
"otel.traces.exporter"/"OTEL_TRACES_EXPORTER"
There was a problem hiding this comment.
No, this is the internal DD_ key - not the OTel key - i.e. all these keys will be prefixed by DD_
The OtelEnvironmentConfigSource class is the one that maps the OTel keys to the internal DD keys.
This was done on purpose because it was much easier to have this separate mapping rather than have to handle a variety of prefixes in the internal config system.
So here we can use any name - it's just in OtelEnvironmentConfigSource that we have to choose the correct OTel key to map from. And here it would be more consistent to use TRACE_OTEL_EXPORTER
| statsDClientSocketBuffer = configProvider.getInteger(STATSD_CLIENT_SOCKET_BUFFER); | ||
| statsDClientSocketTimeout = configProvider.getInteger(STATSD_CLIENT_SOCKET_TIMEOUT); | ||
|
|
||
| otelTracesExporter = configProvider.getString(OTEL_TRACES_EXPORTER); |
There was a problem hiding this comment.
If we go with the above internal key suggestion this would then become:
traceOtelExporter = configProvider.getString(TRACE_OTEL_EXPORTER);
| return configProvider.isEnabled(integrationNames, "jmxfetch.", ".enabled", defaultEnabled); | ||
| } | ||
|
|
||
| public String getOtelTracesExporter() { |
There was a problem hiding this comment.
public String getTraceOtelExporter() {
...c/test/groovy/datadog/trace/bootstrap/config/provider/OtelEnvironmentConfigSourceTest.groovy
Outdated
Show resolved
Hide resolved
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 61 metrics, 10 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~923c88002b, baseline=1.61.0-SNAPSHOT~3ff081cd4b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.06 s) : 0, 1060290
Total [baseline] (11.161 s) : 0, 11161219
Agent [candidate] (1.059 s) : 0, 1059361
Total [candidate] (10.988 s) : 0, 10988134
section appsec
Agent [baseline] (1.254 s) : 0, 1254341
Total [baseline] (11.15 s) : 0, 11150252
Agent [candidate] (1.253 s) : 0, 1253187
Total [candidate] (11.163 s) : 0, 11162681
section iast
Agent [baseline] (1.234 s) : 0, 1233509
Total [baseline] (11.32 s) : 0, 11319661
Agent [candidate] (1.229 s) : 0, 1229287
Total [candidate] (11.338 s) : 0, 11337686
section profiling
Agent [baseline] (1.187 s) : 0, 1187213
Total [baseline] (10.971 s) : 0, 10970765
Agent [candidate] (1.182 s) : 0, 1181581
Total [candidate] (11.01 s) : 0, 11010299
gantt
title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~923c88002b, baseline=1.61.0-SNAPSHOT~3ff081cd4b
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.182 ms) : 0, 1182
crashtracking [candidate] (1.185 ms) : 0, 1185
BytebuddyAgent [baseline] (627.653 ms) : 0, 627653
BytebuddyAgent [candidate] (627.394 ms) : 0, 627394
AgentMeter [baseline] (29.049 ms) : 0, 29049
AgentMeter [candidate] (29.15 ms) : 0, 29150
GlobalTracer [baseline] (256.849 ms) : 0, 256849
GlobalTracer [candidate] (256.502 ms) : 0, 256502
AppSec [baseline] (31.705 ms) : 0, 31705
AppSec [candidate] (31.548 ms) : 0, 31548
Debugger [baseline] (60.364 ms) : 0, 60364
Debugger [candidate] (60.123 ms) : 0, 60123
Remote Config [baseline] (596.818 µs) : 0, 597
Remote Config [candidate] (617.181 µs) : 0, 617
Telemetry [baseline] (8.057 ms) : 0, 8057
Telemetry [candidate] (8.001 ms) : 0, 8001
Flare Poller [baseline] (8.826 ms) : 0, 8826
Flare Poller [candidate] (8.821 ms) : 0, 8821
section appsec
crashtracking [baseline] (1.221 ms) : 0, 1221
crashtracking [candidate] (1.229 ms) : 0, 1229
BytebuddyAgent [baseline] (663.276 ms) : 0, 663276
BytebuddyAgent [candidate] (661.573 ms) : 0, 661573
AgentMeter [baseline] (12.142 ms) : 0, 12142
AgentMeter [candidate] (12.063 ms) : 0, 12063
GlobalTracer [baseline] (259.273 ms) : 0, 259273
GlobalTracer [candidate] (259.461 ms) : 0, 259461
IAST [baseline] (24.346 ms) : 0, 24346
IAST [candidate] (24.403 ms) : 0, 24403
AppSec [baseline] (178.354 ms) : 0, 178354
AppSec [candidate] (178.994 ms) : 0, 178994
Debugger [baseline] (65.811 ms) : 0, 65811
Debugger [candidate] (66.632 ms) : 0, 66632
Remote Config [baseline] (626.638 µs) : 0, 627
Remote Config [candidate] (605.505 µs) : 0, 606
Telemetry [baseline] (9.092 ms) : 0, 9092
Telemetry [candidate] (8.23 ms) : 0, 8230
Flare Poller [baseline] (3.636 ms) : 0, 3636
Flare Poller [candidate] (3.582 ms) : 0, 3582
section iast
crashtracking [baseline] (1.206 ms) : 0, 1206
crashtracking [candidate] (1.197 ms) : 0, 1197
BytebuddyAgent [baseline] (799.991 ms) : 0, 799991
BytebuddyAgent [candidate] (797.301 ms) : 0, 797301
AgentMeter [baseline] (11.57 ms) : 0, 11570
AgentMeter [candidate] (11.357 ms) : 0, 11357
GlobalTracer [baseline] (247.949 ms) : 0, 247949
GlobalTracer [candidate] (247.633 ms) : 0, 247633
IAST [baseline] (25.51 ms) : 0, 25510
IAST [candidate] (25.305 ms) : 0, 25305
AppSec [baseline] (26.704 ms) : 0, 26704
AppSec [candidate] (27.352 ms) : 0, 27352
Debugger [baseline] (71.322 ms) : 0, 71322
Debugger [candidate] (69.808 ms) : 0, 69808
Remote Config [baseline] (531.872 µs) : 0, 532
Remote Config [candidate] (536.11 µs) : 0, 536
Telemetry [baseline] (9.208 ms) : 0, 9208
Telemetry [candidate] (9.213 ms) : 0, 9213
Flare Poller [baseline] (3.323 ms) : 0, 3323
Flare Poller [candidate] (3.362 ms) : 0, 3362
section profiling
crashtracking [baseline] (1.19 ms) : 0, 1190
crashtracking [candidate] (1.171 ms) : 0, 1171
BytebuddyAgent [baseline] (686.682 ms) : 0, 686682
BytebuddyAgent [candidate] (681.975 ms) : 0, 681975
AgentMeter [baseline] (8.651 ms) : 0, 8651
AgentMeter [candidate] (8.611 ms) : 0, 8611
GlobalTracer [baseline] (215.836 ms) : 0, 215836
GlobalTracer [candidate] (215.146 ms) : 0, 215146
AppSec [baseline] (32.328 ms) : 0, 32328
AppSec [candidate] (32.118 ms) : 0, 32118
Debugger [baseline] (65.137 ms) : 0, 65137
Debugger [candidate] (63.696 ms) : 0, 63696
Remote Config [baseline] (587.645 µs) : 0, 588
Remote Config [candidate] (574.921 µs) : 0, 575
Telemetry [baseline] (8.421 ms) : 0, 8421
Telemetry [candidate] (10.163 ms) : 0, 10163
Flare Poller [baseline] (3.493 ms) : 0, 3493
Flare Poller [candidate] (3.485 ms) : 0, 3485
ProfilingAgent [baseline] (93.67 ms) : 0, 93670
ProfilingAgent [candidate] (93.68 ms) : 0, 93680
Profiling [baseline] (94.242 ms) : 0, 94242
Profiling [candidate] (94.232 ms) : 0, 94232
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~923c88002b, baseline=1.61.0-SNAPSHOT~3ff081cd4b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.058 s) : 0, 1058341
Total [baseline] (8.892 s) : 0, 8892214
Agent [candidate] (1.059 s) : 0, 1058659
Total [candidate] (8.844 s) : 0, 8843580
section iast
Agent [baseline] (1.228 s) : 0, 1227568
Total [baseline] (9.53 s) : 0, 9530165
Agent [candidate] (1.226 s) : 0, 1225848
Total [candidate] (9.568 s) : 0, 9568355
gantt
title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~923c88002b, baseline=1.61.0-SNAPSHOT~3ff081cd4b
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.194 ms) : 0, 1194
crashtracking [candidate] (1.203 ms) : 0, 1203
BytebuddyAgent [baseline] (627.529 ms) : 0, 627529
BytebuddyAgent [candidate] (627.94 ms) : 0, 627940
AgentMeter [baseline] (28.975 ms) : 0, 28975
AgentMeter [candidate] (29.072 ms) : 0, 29072
GlobalTracer [baseline] (256.712 ms) : 0, 256712
GlobalTracer [candidate] (257.166 ms) : 0, 257166
AppSec [baseline] (31.781 ms) : 0, 31781
AppSec [candidate] (31.769 ms) : 0, 31769
Debugger [baseline] (59.384 ms) : 0, 59384
Debugger [candidate] (59.414 ms) : 0, 59414
Remote Config [baseline] (599.58 µs) : 0, 600
Remote Config [candidate] (592.312 µs) : 0, 592
Telemetry [baseline] (8.108 ms) : 0, 8108
Telemetry [candidate] (8.122 ms) : 0, 8122
Flare Poller [baseline] (8.049 ms) : 0, 8049
Flare Poller [candidate] (7.289 ms) : 0, 7289
section iast
crashtracking [baseline] (1.204 ms) : 0, 1204
crashtracking [candidate] (1.202 ms) : 0, 1202
BytebuddyAgent [baseline] (796.532 ms) : 0, 796532
BytebuddyAgent [candidate] (795.049 ms) : 0, 795049
AgentMeter [baseline] (11.313 ms) : 0, 11313
AgentMeter [candidate] (11.317 ms) : 0, 11317
GlobalTracer [baseline] (247.626 ms) : 0, 247626
GlobalTracer [candidate] (247.518 ms) : 0, 247518
IAST [baseline] (25.329 ms) : 0, 25329
IAST [candidate] (25.213 ms) : 0, 25213
AppSec [baseline] (26.47 ms) : 0, 26470
AppSec [candidate] (27.236 ms) : 0, 27236
Debugger [baseline] (68.021 ms) : 0, 68021
Debugger [candidate] (68.442 ms) : 0, 68442
Remote Config [baseline] (526.334 µs) : 0, 526
Remote Config [candidate] (522.258 µs) : 0, 522
Telemetry [baseline] (10.621 ms) : 0, 10621
Telemetry [candidate] (9.687 ms) : 0, 9687
Flare Poller [baseline] (3.761 ms) : 0, 3761
Flare Poller [candidate] (3.472 ms) : 0, 3472
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 3 performance regressions! Performance is the same for 17 metrics, 16 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~923c88002b, baseline=1.61.0-SNAPSHOT~3ff081cd4b
dateFormat X
axisFormat %s
section baseline
no_agent (19.014 ms) : 18823, 19206
. : milestone, 19014,
appsec (18.324 ms) : 18139, 18509
. : milestone, 18324,
code_origins (17.661 ms) : 17486, 17837
. : milestone, 17661,
iast (18.013 ms) : 17834, 18192
. : milestone, 18013,
profiling (18.448 ms) : 18261, 18635
. : milestone, 18448,
tracing (17.623 ms) : 17446, 17800
. : milestone, 17623,
section candidate
no_agent (18.464 ms) : 18273, 18655
. : milestone, 18464,
appsec (18.798 ms) : 18607, 18988
. : milestone, 18798,
code_origins (17.766 ms) : 17587, 17945
. : milestone, 17766,
iast (18.569 ms) : 18382, 18756
. : milestone, 18569,
profiling (18.411 ms) : 18225, 18598
. : milestone, 18411,
tracing (17.79 ms) : 17613, 17968
. : milestone, 17790,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~923c88002b, baseline=1.61.0-SNAPSHOT~3ff081cd4b
dateFormat X
axisFormat %s
section baseline
no_agent (1.169 ms) : 1158, 1180
. : milestone, 1169,
iast (3.212 ms) : 3168, 3256
. : milestone, 3212,
iast_FULL (5.604 ms) : 5549, 5659
. : milestone, 5604,
iast_GLOBAL (3.579 ms) : 3518, 3640
. : milestone, 3579,
profiling (2.088 ms) : 2068, 2107
. : milestone, 2088,
tracing (1.797 ms) : 1781, 1812
. : milestone, 1797,
section candidate
no_agent (1.186 ms) : 1174, 1198
. : milestone, 1186,
iast (3.231 ms) : 3190, 3272
. : milestone, 3231,
iast_FULL (5.882 ms) : 5823, 5942
. : milestone, 5882,
iast_GLOBAL (3.506 ms) : 3439, 3573
. : milestone, 3506,
profiling (2.413 ms) : 2391, 2436
. : milestone, 2413,
tracing (1.877 ms) : 1861, 1893
. : milestone, 1877,
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.61.0-SNAPSHOT~923c88002b, baseline=1.61.0-SNAPSHOT~3ff081cd4b
dateFormat X
axisFormat %s
section baseline
no_agent (1.478 ms) : 1466, 1489
. : milestone, 1478,
appsec (3.794 ms) : 3572, 4016
. : milestone, 3794,
iast (2.25 ms) : 2181, 2319
. : milestone, 2250,
iast_GLOBAL (2.307 ms) : 2237, 2376
. : milestone, 2307,
profiling (2.111 ms) : 2054, 2167
. : milestone, 2111,
tracing (2.068 ms) : 2014, 2121
. : milestone, 2068,
section candidate
no_agent (1.483 ms) : 1471, 1494
. : milestone, 1483,
appsec (3.807 ms) : 3585, 4028
. : milestone, 3807,
iast (2.259 ms) : 2190, 2328
. : milestone, 2259,
iast_GLOBAL (2.302 ms) : 2233, 2372
. : milestone, 2302,
profiling (2.088 ms) : 2034, 2143
. : milestone, 2088,
tracing (2.067 ms) : 2013, 2121
. : milestone, 2067,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~923c88002b, baseline=1.61.0-SNAPSHOT~3ff081cd4b
dateFormat X
axisFormat %s
section baseline
no_agent (15.6 s) : 15600000, 15600000
. : milestone, 15600000,
appsec (14.794 s) : 14794000, 14794000
. : milestone, 14794000,
iast (17.967 s) : 17967000, 17967000
. : milestone, 17967000,
iast_GLOBAL (17.871 s) : 17871000, 17871000
. : milestone, 17871000,
profiling (15.038 s) : 15038000, 15038000
. : milestone, 15038000,
tracing (15.076 s) : 15076000, 15076000
. : milestone, 15076000,
section candidate
no_agent (15.534 s) : 15534000, 15534000
. : milestone, 15534000,
appsec (14.804 s) : 14804000, 14804000
. : milestone, 14804000,
iast (18.344 s) : 18344000, 18344000
. : milestone, 18344000,
iast_GLOBAL (17.787 s) : 17787000, 17787000
. : milestone, 17787000,
profiling (15.097 s) : 15097000, 15097000
. : milestone, 15097000,
tracing (14.765 s) : 14765000, 14765000
. : milestone, 14765000,
|
| otelEnvKey | otelEnvValue || metricType | metricValue | metricNamespace | metricName | tagsOtelValue | ||
| 'OTEL_METRICS_EXPORTER' | 'otlp' || 'count' | 1 | 'tracers' | 'otel.env.unsupported' | 'config_opentelemetry:otel_metrics_exporter' | ||
| 'OTEL_TRACES_EXPORTER' | 'otlp' || 'count' | 1 | 'tracers' | 'otel.env.unsupported' | 'config_opentelemetry:otel_traces_exporter' | ||
| 'OTEL_TRACES_EXPORTER' | 'zipkin' || 'count' | 1 | 'tracers' | 'otel.env.unsupported' | 'config_opentelemetry:otel_traces_exporter' |
There was a problem hiding this comment.
This test seems to just be checking that the otel.env.unsupported metric is reported when an otel environment variable is discovered with an unsupported value; since this PR adds support for OTEL_TRACES_EXPORTER=otlp, I changed the test value to some other unsupported value -- "zipkin"
Reference: https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/#exporter-selection
What Does This Do
Creates new configuration for otlp traces export mode.
Motivation
RFC: https://docs.google.com/document/d/1AsUrJxjJavLvSG33kUAJLYzGU8IYgrnf1SMbFDsuGmo/edit?pli=1&tab=t.0#heading=h.wbjhtxw8dxti
New configuration for enabled "otlp export" mode. Follow-up PRs will implement a new, otlp-conformant trace serialization mechanism if this configuration is enabled.
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: [PROJ-IDENT]
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.