Skip to content

Conversation

@dd-octo-sts
Copy link
Contributor

@dd-octo-sts dd-octo-sts bot commented Nov 14, 2025

Backport c2e0ab9 from #15278 to 4.0.

Description

Enables the native writer by default. The native writer can still be disabled through _DD_TRACE_WRITER_NATIVE.

Testing

All tests are run with the native writer. The native writer have also been enabled on some services internally for dogfooding purposes.

Risks

This changes the logic behind trace export and client-side stats computation (for customers who enabled it). We expect no change in behavior for trace exporting. Client-side stats behavior may show some differences as the current python implementation is not fully compliant with the client-side stats spec.

@dd-octo-sts dd-octo-sts bot added the changelog/no-changelog A changelog entry is not required for this PR. label Nov 14, 2025
@dd-octo-sts dd-octo-sts bot requested review from a team as code owners November 14, 2025 19:27
## Description
Enables the native writer by default. The native writer can still be
disabled through _DD_TRACE_WRITER_NATIVE.

## Testing
All tests are run with the native writer. The native writer have also
been enabled on some services internally for dogfooding purposes.

## Risks
This changes the logic behind trace export and client-side stats
computation (for customers who enabled it). We expect no change in
behavior for trace exporting. Client-side stats behavior may show some
differences as the current python implementation is not fully compliant
with the client-side stats spec.

---------

Co-authored-by: Emmett Butler <[email protected]>
(cherry picked from commit c2e0ab9)
@github-actions
Copy link
Contributor

CODEOWNERS have been resolved as:

.gitlab/benchmarks/bp-runner.microbenchmarks.fail-on-breach.yml         @DataDog/python-guild @DataDog/apm-core-python
ddtrace/internal/settings/_config.py                                    @DataDog/python-guild @DataDog/apm-sdk-capabilities-python
tests/contrib/mcp/conftest.py                                           @DataDog/ml-observability
tests/integration/test_integration.py                                   @DataDog/apm-core-python
tests/telemetry/test_writer.py                                          @DataDog/apm-python

@github-actions
Copy link
Contributor

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 240 ± 2 ms.

The average import time from base is: 235 ± 2 ms.

The import time difference between this PR and base is: 5.52 ± 0.1 ms.

Import time breakdown

The following import paths have grown:

ddtrace.auto 7.613 ms (3.17%)
ddtrace 7.613 ms (3.17%)
ddtrace.trace 7.613 ms (3.17%)

The following import paths have shrunk:

ddtrace.auto 2.176 ms (0.91%)
ddtrace.bootstrap.sitecustomize 1.509 ms (0.63%)
ddtrace.bootstrap.preload 1.509 ms (0.63%)
ddtrace.internal.remoteconfig.client 0.674 ms (0.28%)
multiprocessing.sharedctypes 0.075 ms (0.03%)
ctypes 0.040 ms (0.02%)
multiprocessing 0.043 ms (0.02%)
multiprocessing.context 0.043 ms (0.02%)
multiprocessing.reduction 0.043 ms (0.02%)
pickle 0.043 ms (0.02%)
ddtrace 0.667 ms (0.28%)
ddtrace.internal._unpatched 0.028 ms (0.01%)
json 0.028 ms (0.01%)
json.decoder 0.028 ms (0.01%)
re 0.028 ms (0.01%)
enum 0.028 ms (0.01%)
types 0.028 ms (0.01%)

@emmettbutler
Copy link
Collaborator

force-merging because tests other than benchmarks are complete

@emmettbutler emmettbutler merged commit f14f24f into 4.0 Nov 14, 2025
858 of 865 checks passed
@emmettbutler emmettbutler deleted the backport-15278-to-4.0 branch November 14, 2025 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog A changelog entry is not required for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants