chore(native): bump libdatadog v35 → v37#18821
Conversation
- Rename datadog-remote-config → libdd-remote-config (package renamed in v36). - Remove libdd-http-client and stats-obfuscation feature (folded into defaults in v36). - Remove bytes/url deps that were only needed by http-client. - SharedRuntime is now a trait in v37; ForkSafeRuntime is the concrete type. Thread ForkSafeRuntime through SharedRuntimePy, TraceExporterBuilderPy, and TraceExporterPy. - Update tracer_flare.rs to the new libdd-remote-config config::agent_config/agent_task API. - Handle AssignmentReason::Default added to datadog-ffe in v37. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
libdatadog removed the libdd-http-client crate in v36; it no longer ships in v37. Remove the native http_client module and all its dependents: - Delete src/native/http_client/ (client, response, errors, mod) - Remove mod/register_http_client from lib.rs - Remove enable_client_side_stats_obfuscation from data_pipeline/mod.rs (stats-obfuscation feature merged into libdd-data-pipeline defaults) - Remove HTTPClient, HttpResponse, HttpClientError and subclasses from _native.pyi and ddtrace/internal/native/__init__.py - Delete ddtrace/internal/http_client.py and its tests The HTTPClient had no production callers outside its own wrapper module. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Codeowners resolved as |
stats-obfuscation is now on by default in libdatadog v37; the enable_client_side_stats_obfuscation() builder method no longer exists. Remove the call from TraceExporterWriter. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…bfuscation feature The method still exists in libdatadog v37 but requires the stats-obfuscation feature on libdd-data-pipeline. Re-add the feature flag and restore the PyO3 wrapper, Python stub, and writer call that were incorrectly removed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
BenchmarksBenchmark execution time: 2026-07-08 19:09:07 Comparing candidate commit b441a95 in PR branch Found 0 performance improvements and 3 performance regressions! Performance is the same for 613 metrics, 10 unstable metrics. scenario:iastaspectsospath-ospathbasename_aspect
scenario:span-start
scenario:tracer-small
|
3d0adcb to
4fcb1a9
Compare
libdd-http-client still exists in v37 — it was redesigned, not removed. Restore the http_client Rust module rewritten for the v37 API: - HttpClient::new() no longer takes a runtime; BlockingRuntime trait (not SharedRuntime) provides block_on — update imports accordingly - Arc<ForkSafeRuntime> replaces Arc<SharedRuntime> (SharedRuntime is now a trait in v37; ForkSafeRuntime is the concrete type) - Re-add libdd-http-client, bytes, url deps to Cargo.toml - Restore mod http_client and register_http_client in lib.rs - Restore ddtrace/internal/http_client.py and its test suite - Restore HTTPClient, HttpResponse, HttpClientError and subclasses in _native.pyi and ddtrace/internal/native/__init__.py - Add missing Iterable import to _native.pyi Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
4fcb1a9 to
89139de
Compare
The merged libdatadog FFE remaps per-flag config parse failures (bad regex, variant type mismatch) from ConfigurationParseError to the new FlagConfigurationInvalid variant. dd-trace-py's From<EvaluationError> match didn't handle it, so it fell through to ErrorCode::General and the feature_flag.evaluations metric reported error.type=general instead of parse_error, failing the FEATURE_FLAGGING_AND_EXPERIMENTATION system tests. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Co-authored-by: Munir Abdinur <[email protected]>
Restore the bytes 1.10+ comment and the original ordering of url and libdd-http-client that were cosmetically changed during the v37 bump. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
With collect_all_threads enabled (default in v37), the receiver uses
PTRACE_SEIZE + PTRACE_INTERRUPT on the crashing thread, which interrupts
poll() in wait_for_pollhup with EINTR. When crashing from a dynamically-
loaded C++ extension on Python 3.14, repeated EINTR prevents the 5-second
timeout from expiring, causing an indefinite hang.
Consistent with the existing pattern of Python 3.14 crashtracker skips
("Stack v2 not supported on 3.14") in 9d9bd80.
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Circular import analysis
|
…d from ptrace The receiver in v37 began ptracing the crashing thread (crashing_tid) as part of collect_all_threads. That thread is blocked in poll() inside its signal handler on the alternate signal stack; the resulting PTRACE_INTERRUPT issues EINTR in a loop, causing the receiver to hang indefinitely on CPython 3.14. Pin all libdatadog deps to commit 504ea9d7 on the fix branch, which restores the v35 behaviour of excluding crashing_tid from stream_thread_contexts. With the fix in place the 3.14 skip is no longer needed. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
|
Im not sure if claude's diagnosis on 52fa5a9 is correct. Do you mind if I try to fix this on your branch sometime later today before you merge? |
@gyuheon0h Yes, that was a mistake. I was looking into a timeout in a crash tracking test: https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-py/-/pipelines/123032120. It seems like v37 introduced a regression. Here's a potential fix: https://github.com/DataDog/libdatadog/pull/2207/changes. I will revert the build changes in this PR. |
…ng thread from ptrace" This reverts commit 52fa5a9.
Co-authored-by: Munir Abdinur <[email protected]>
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
The merge request has been interrupted because the build 7934734439606769018 took longer than expected. The current limit for the base branch 'main' is 120 minutes. |
|
/merge |
|
View all feedbacks in Devflow UI.
This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
The expected merge time in
|
|
/merge -f --reason PR is taking forever to merge |
|
View all feedbacks in Devflow UI.
PR already in the queue with status waiting |
## Description - Bump all libdatadog dependencies from v35.0.0 to v37.0.0. - Rename datadog-remote-config → libdd-remote-config (package renamed in v36). - SharedRuntime is now a trait in v37; ForkSafeRuntime is the concrete fork-safe implementation. Thread ForkSafeRuntime through SharedRuntimePy, TraceExporterBuilderPy, and TraceExporterPy. - Rewrite src/native/http_client/ for the v37 libdd-http-client API: HttpClient::new() no longer accepts a runtime argument; block_on moved to the BlockingRuntime trait (imported separately from SharedRuntime). - Update tracer_flare.rs to the new libdd-remote-config config::agent_config / config::agent_task parse API. - Handle AssignmentReason::Default added to datadog-ffe in v37. - Re-enable stats-obfuscation feature on libdd-data-pipeline (still gated behind an explicit feature flag in v37; not folded into defaults). ## Testing n/a ## Risks n/a ## Additional Notes n/a Co-authored-by: gyuheon0h <[email protected]> Co-authored-by: bm1549 <[email protected]> Co-authored-by: munir.abdinur <[email protected]>
…guration (#18495) ## Description This PR adds ``DD_TRACE_OTEL_SEMANTICS_ENABLED`` to opt in to OpenTelemetry trace semantics for spans. The result is that using OpenTelemetry Tracing instrumentations allows DD SDKs to produce OTLP spans with nearly identical span fields. When enabled, this updates the dd-trace-py behavior in the following ways: - General tracing behaviors - Stops the library from adding the `version`, `language`, and `env` tags as span attributes - OpenTelemetry Tracing APIs - `OtelSpan.set_attribute` no longer remaps span tags such as `http.response.status_code` or `service.name` so they will maintain their intended key and value type - `OtelSpan.record_exception` no longer sets span attributes `error.message`, `error.type`, or `error.stack`. These exist on the `exception` span event and are updated in this PR so that the `exception.stacktrace` and `exception.type` attributes on the span event match what is emitted by the OpenTelemetry SDK - `OtelSpan.set_status` updates the `error.message` span attribute each time a new status is registered, including recording a newer status that lacks a message - OTLP traces export - Calls `enable_otel_trace_semantics()` on the libdatadog native trace exporter to remove Datadog-specific span attributes from being emitted on OTLP spans (see the related libdatadog PR for specific attribute changes) Also makes the following fixes: - When OTLP traces export is enabled, native span events are also enabled because OTLP spans have a first-class `events` field. Relies on DataDog/libdatadog#2091 which implements the OTLP trace exporter changes and on #18821 which updates the libdatadog dependency. ## Testing Unit tests are included for the updated OTel test span behavior and the native span events configuration ## Risks Besides the native span events change, the remaining changes are opt-in so the risk is low. ## Additional Notes Currently the libdatadog dependency is set to a development branch which contains the updated `TraceExporterBuilder::enable_otel_trace_semantics()` API Co-authored-by: gyuheon0h <[email protected]> Co-authored-by: mabdinur <[email protected]> Co-authored-by: bm1549 <[email protected]> Co-authored-by: zach.montoya <[email protected]>
Description
Testing
n/a
Risks
n/a
Additional Notes
n/a