Skip to content

Conversation

mabdinur
Copy link
Contributor

Description

Improves tracer configuration performance and API consistency by deprecating specific tracer.configure() parameters.

Changes:

  • trace_processors → use tracer.processors (no longer resets SpanAggregator)
  • context_provider → use tracer.context_provider (removes duplicate API)
  • apm_tracing_disabled → use apm_tracing_enabled (consistent naming with other parameters)

Testing

Updated tests and added deprecation warnings for 4.0.0 removal.

Risks

Low - backward compatibility maintained for 3.x

Additional Notes

Reduces processor update overhead and reduces the size of the configuration API.

Copy link
Contributor

CODEOWNERS have been resolved as:

releasenotes/notes/update-tracer-configure-190952ff70420bda.yaml        @DataDog/apm-python
ddtrace/_trace/processor/__init__.py                                    @DataDog/apm-sdk-capabilities-python
ddtrace/_trace/tracer.py                                                @DataDog/apm-sdk-capabilities-python
ddtrace/contrib/internal/tornado/application.py                         @DataDog/apm-core-python @DataDog/apm-idm-python
ddtrace/internal/ci_visibility/recorder.py                              @DataDog/ci-app-libraries
tests/appsec/appsec/test_asm_standalone.py                              @DataDog/asm-python
tests/appsec/contrib_appsec/django_app/settings.py                      @DataDog/asm-python
tests/appsec/contrib_appsec/flask_app/app.py                            @DataDog/asm-python
tests/appsec/integrations/django_tests/django_app/settings.py           @DataDog/asm-python
tests/contrib/django/django_app/settings.py                             @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/flask/app.py                                              @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/gunicorn/wsgi_mw_app.py                                   @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/kafka/test_kafka.py                                       @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/openai/conftest.py                                        @DataDog/ml-observability
tests/contrib/openai/test_openai_v1.py                                  @DataDog/ml-observability
tests/contrib/pyramid/app/app.py                                        @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/pyramid/pserve_app/app/__init__.py                        @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/sanic/run_server.py                                       @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/urllib3/test_urllib3.py                                   @DataDog/apm-core-python @DataDog/apm-idm-python
tests/integration/test_integration_snapshots.py                         @DataDog/apm-core-python
tests/integration/test_priority_sampling.py                             @DataDog/apm-sdk-capabilities-python
tests/opentelemetry/flask_app.py                                        @DataDog/apm-sdk-capabilities-python
tests/telemetry/test_telemetry.py                                       @DataDog/apm-python
tests/tracer/runtime/test_tag_collectors.py                             @DataDog/apm-sdk-capabilities-python
tests/tracer/test_processors.py                                         @DataDog/apm-sdk-capabilities-python
tests/tracer/test_propagation.py                                        @DataDog/apm-sdk-capabilities-python
tests/tracer/test_tracer.py                                             @DataDog/apm-sdk-capabilities-python

Copy link
Contributor

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

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

The average import time from base is: 238 ± 1 ms.

The import time difference between this PR and base is: -2.05 ± 0.08 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 1.970 ms (0.83%)
ddtrace.bootstrap.sitecustomize 1.289 ms (0.55%)
ddtrace.bootstrap.preload 1.289 ms (0.55%)
ddtrace.internal.remoteconfig.client 0.633 ms (0.27%)
ddtrace 0.681 ms (0.29%)
ddtrace.internal._unpatched 0.031 ms (0.01%)
json 0.031 ms (0.01%)
json.decoder 0.031 ms (0.01%)
re 0.031 ms (0.01%)
enum 0.031 ms (0.01%)
types 0.031 ms (0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant