feat(tracing): export traces over OTLP with libdatadog - #6152
Draft
bm1549 wants to merge 3 commits into
Draft
Conversation
Resolve every current Ruby appraisal and the YARD bundle to the published v38 packages. Refresh existing checksum entries while preserving newer dependency locks from master.
Contributor
Typing analysisNote: Ignored files are excluded from the next sections. Untyped methodsThis PR introduces 2 partially typed methods, and clears 3 partially typed methods. It increases the percentage of typed methods from 69.43% to 69.62% (+0.19%). Partially typed methods (+2-3)❌ Introduced:If you believe a method or an attribute is rightfully untyped or partially typed, you can add |
This was referenced Aug 5, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Concise implementation report
AI was used to help implement and review this change. I read and verified the resulting code.
Adds OTLP trace export for spans created by
datadog, using the native libdatadog trace exporter.OTEL_TRACES_EXPORTER=otlpselects the path, with trace-specific endpoint, headers, timeout, and protocol settings taking precedence over the general OTLP settings.Both
http/jsonandhttp/protobufare supported. Custom writers and synchronous test mode keep their existing flush behavior; native OTLP export sends complete local traces. Unsupported native platforms fail closed instead of sending traces to another destination.Motivation:
dd-trace-py already reuses libdatadog for OTLP trace export. This brings the same transport shape to Ruby while sharing libdatadog's encoding and HTTP pipeline. The transport boundary can accept another protocol later without adding gRPC in this PR.
Change log entry
Yes. Export Datadog spans over OTLP HTTP with JSON or protobuf by setting
OTEL_TRACES_EXPORTER=otlp.Additional Notes:
This draft depends on the companion libdatadog C API change and a libdatadog package containing that API. Shared test activation is in system-tests #7458. Span links, span events, and structured metadata retain the documented native-transport limitations.
How to test the change?
bundle exec rake standardbundle exec rake steep:checksdk-backend-verifywith HTTP/protobuf — the header-enforcing proxy accepted the application batches and the backend returned the expected service metadata and 128-bit trace IDs