Repository navigation
Conversation
Codeowners resolved asResolved from the full PR diff against |
Circular import analysis
|
Dependency direction analysis
|
|
✅ All CI checks and tests passed. 🎉 All green!🧪 All tests passed 🔗 Commit SHA: 20c26bd | Docs | View more details | Give us feedback! |
BenchmarksBenchmark execution time: 2026-10-06 18:11:49 Comparing candidate commit 20c26bd in PR branch Found 0 performance improvements and 5 performance regressions! Performance is the same for 609 metrics, 10 unstable metrics, 6 known flaky benchmarks, 18 flaky benchmarks without significant changes.
|
Description
This draft adds an opt-in lightweight OpenTelemetry metrics export path without making
grpcioa dependency of the new path.ddtrace[opentelemetry-metrics], which installs the upstream HTTP/protobuf exporter andgrpclib.grpcliband the upstream OTLP protobuf encoder.ddtrace[opentelemetry]extra and falls back to the upstream gRPC exporter when the lightweight stack is unavailable.The initial experiment made the HTTP exporter a required dependency. CI showed that this is not safe: its exact OpenTelemetry SDK/protobuf coupling conflicts with supported Molten, MySQL, and Ray dependency sets. Keeping the exporter opt-in isolates those constraints and leaves default installations unchanged.
Aggregation and periodic work remain in the OpenTelemetry Python SDK. This PR does not claim the native libdatadog design's CPU, RSS, or GIL improvements.
Installed footprint
Measured from installed distribution files in clean macOS arm64/Python 3.13 environments, excluding generated bytecode.
grpclibstackgrpcioexporterThe lightweight stack is about 50.9% smaller than the equivalent environment with the upstream gRPC exporter. Users who do not install the new extra gain no runtime dependencies.
Testing
grpclibclient/server OTLP metrics round trip.Risks
Follow-up
Logs still use the existing upstream exporters. A follow-up can add the same HTTP/
grpclibtransport for logs; only then should we consider replacing or deprecating the existing fullopentelemetryextra.