Refactor TracesTransportType and fix OTLP traces endpoint bug when APM UDS socket is set#8614
Refactor TracesTransportType and fix OTLP traces endpoint bug when APM UDS socket is set#8614zacharycmontoya wants to merge 7 commits into
TracesTransportType and fix OTLP traces endpoint bug when APM UDS socket is set#8614Conversation
BenchmarksBenchmark execution time: 2026-05-14 22:15:19 Comparing candidate commit 88d24ba in PR branch Some scenarios are present only in baseline or only in candidate runs. If you didn't create or remove some scenarios in your branch, this maybe a sign of crashed benchmarks 💥💥💥 Scenarios present only in baseline:
Found 1 performance improvements and 4 performance regressions! Performance is the same for 48 metrics, 19 unstable metrics, 87 known flaky benchmarks, 39 flaky benchmarks without significant changes.
|
Execution-Time Benchmarks Report ⏱️Execution-time results for samples comparing This PR (8614) and master. ✅ No regressions detected - check the details below Full Metrics ComparisonFakeDbCommand
HttpMessageHandler
Comparison explanationExecution-time benchmarks measure the whole time it takes to execute a program, and are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are highlighted in **red**. The following thresholds were used for comparing the execution times:
Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard. Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph). Duration chartsFakeDbCommand (.NET Framework 4.8)gantt
title Execution time (ms) FakeDbCommand (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8614) - mean (73ms) : 70, 76
master - mean (73ms) : 70, 75
section Bailout
This PR (8614) - mean (79ms) : 75, 83
master - mean (79ms) : 75, 83
section CallTarget+Inlining+NGEN
This PR (8614) - mean (1,103ms) : 1063, 1143
master - mean (1,104ms) : 1056, 1153
FakeDbCommand (.NET Core 3.1)gantt
title Execution time (ms) FakeDbCommand (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8614) - mean (116ms) : 109, 123
master - mean (113ms) : 109, 117
section Bailout
This PR (8614) - mean (117ms) : 112, 122
master - mean (118ms) : 113, 124
section CallTarget+Inlining+NGEN
This PR (8614) - mean (786ms) : 764, 807
master - mean (787ms) : 759, 814
FakeDbCommand (.NET 6)gantt
title Execution time (ms) FakeDbCommand (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8614) - mean (103ms) : 97, 109
master - mean (102ms) : 98, 106
section Bailout
This PR (8614) - mean (101ms) : 99, 104
master - mean (106ms) : 100, 111
section CallTarget+Inlining+NGEN
This PR (8614) - mean (944ms) : 900, 988
master - mean (946ms) : 907, 986
FakeDbCommand (.NET 8)gantt
title Execution time (ms) FakeDbCommand (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8614) - mean (99ms) : 96, 102
master - mean (99ms) : 95, 103
section Bailout
This PR (8614) - mean (104ms) : 98, 109
master - mean (103ms) : 98, 108
section CallTarget+Inlining+NGEN
This PR (8614) - mean (821ms) : 778, 864
master - mean (822ms) : 788, 856
HttpMessageHandler (.NET Framework 4.8)gantt
title Execution time (ms) HttpMessageHandler (.NET Framework 4.8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8614) - mean (200ms) : 192, 208
master - mean (202ms) : 194, 210
section Bailout
This PR (8614) - mean (204ms) : 201, 207
master - mean (206ms) : 198, 213
section CallTarget+Inlining+NGEN
This PR (8614) - mean (1,202ms) : 1157, 1248
master - mean (1,205ms) : 1159, 1251
HttpMessageHandler (.NET Core 3.1)gantt
title Execution time (ms) HttpMessageHandler (.NET Core 3.1)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8614) - mean (293ms) : 286, 300
master - mean (288ms) : 281, 295
section Bailout
This PR (8614) - mean (290ms) : 283, 297
master - mean (290ms) : 283, 296
section CallTarget+Inlining+NGEN
This PR (8614) - mean (964ms) : 943, 985
master - mean (967ms) : 941, 992
HttpMessageHandler (.NET 6)gantt
title Execution time (ms) HttpMessageHandler (.NET 6)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8614) - mean (283ms) : 275, 290
master - mean (281ms) : 275, 287
section Bailout
This PR (8614) - mean (283ms) : 277, 290
master - mean (280ms) : 275, 285
section CallTarget+Inlining+NGEN
This PR (8614) - mean (1,168ms) : 1123, 1212
master - mean (1,163ms) : 1117, 1208
HttpMessageHandler (.NET 8)gantt
title Execution time (ms) HttpMessageHandler (.NET 8)
dateFormat x
axisFormat %Q
todayMarker off
section Baseline
This PR (8614) - mean (279ms) : 272, 287
master - mean (281ms) : 274, 289
section Bailout
This PR (8614) - mean (280ms) : 274, 286
master - mean (282ms) : 275, 288
section CallTarget+Inlining+NGEN
This PR (8614) - mean (1,047ms) : 1007, 1087
master - mean (1,041ms) : 997, 1085
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- Rename enum TracesTransportType to AgentTransportType (still used by ExporterSettings.TracesTransport) - Add new AgentTransport property (type=AgentTransportType) to the ExporterSettings to separate logical traces endpoint vs agent endpoint - Change some usage of ExporterSettings.TracesTransport to ExporterSettings.AgentTransport
…ing an IApiRequestFactory
146136f to
629b45b
Compare
…ces HTTP client FOR ALL TRANSPORTS
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed58050984
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… as a regression test
- Do not set OTLP trace headers twice. - Reset the traces transport back to the Datadog Agent transport if the OTLP protocol is unsupported
…lpTraces as a regression test" This reverts commit 4243173.
Summary of changes
Refactors the
TracesTransportTypetoAgentTransportTypeand updates its usage across the repository to better separate "agent communication" from "traces communication".Also fixes a bug related to this issue where setting the APM UDS socket affected the HttpClient used by OTLP traces export.
Reason for change
The primary motivation was to resolve the following OTLP traces export issue: When OTLP traces export is enabled through the configuration
OTEL_TRACES_EXPORTER=otlp, the endpoint defaults to TCP/IP communication with endpointhttp://localhost:4317orhttp://localhost:4318. However, whenDD_APM_RECEIVER_SOCKETis configured and its socket file is present, the underlying HTTP client is erroneously being configured for UDS communication rather than TCP/IP.Implementation details
ExporterSettings.TracesTransport)ExporterSettings.TracesTransporttoExporterSettings.AgentTransport. When OTLP traces export is enabled, override the previously calculatedExporterSettings.TracesTransportwith the calculated transport from the OTLP configurationsManagedApiOtlpto create an api factory by calling a newOtlpTransportStrategy.GetTracesmethod rather thanTracesTransportStrategy.Get. This will properly set the headers, endpoint, and timeout values for the underlying HTTP client following the OTLP configuration rather than the original DD Agent configuration.Test coverage
Existing tests are exercised and a few new unit tests are added to validate the transport and endpoint. Some tests still use the
ExporterSettings.TracesTransportproperty to make assertions about traces specifically, while other tests have been updated to assert againstExporterSettings.AgentTransportOther details
OtlpTransportStrategyreuses the logic fromAgentTransportStrategyto create HTTP clients for HTTP, Named Pipes, and UDS even though the latter two are untested. If desired, we can remove those code paths as they are currently untested.Supercedes #8460