Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(tracing): remove deprecated properties and parameters #12199

Merged
merged 13 commits into from
Feb 4, 2025

Conversation

mabdinur
Copy link
Contributor

@mabdinur mabdinur commented Feb 3, 2025

  • Introduces the following breaking changes to tracing components:
    • Removes deprecated parameters from Tracer.configure(...) method and removes the Tracer.sampler attribute.
    • Drops support for multiple tracer instances, ddtrace.trace.Tracer can not be reinitialized.
    • Removes the deprecated Span.sampled property
    • Drops support for configuring sampling rules using functions and regex in the
      ddtrace.tracer.sampler.rules[].choose_matcher(...) method
      and removes the timestamp_ns parameter from ddtrace.internal.rate_limiter.RateLimiter.is_allowed().
    • Drops support for configuring DD_TRACE_METHODS with the '[]' notation. Ensure DD_TRACE_METHODS use the ':' notation instead".
    • Removes the deprecated ddtracer parameter from ddtrace.opentracer.tracer.Tracer().

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

Copy link
Contributor

github-actions bot commented Feb 3, 2025

CODEOWNERS have been resolved as:

releasenotes/notes/remove-tracing-attrs-3-0-5743fa668289d5bc.yaml       @DataDog/apm-python
benchmarks/bm/utils.py                                                  @DataDog/apm-core-python
benchmarks/rate_limiter/scenario.py                                     @DataDog/apm-core-python
ddtrace/_trace/sampling_rule.py                                         @DataDog/apm-sdk-api-python
ddtrace/_trace/span.py                                                  @DataDog/apm-sdk-api-python
ddtrace/_trace/tracer.py                                                @DataDog/apm-sdk-api-python
ddtrace/internal/rate_limiter.py                                        @DataDog/apm-core-python
ddtrace/internal/tracemethods.py                                        @DataDog/apm-sdk-api-python
ddtrace/opentracer/tracer.py                                            @DataDog/apm-sdk-api-python
tests/integration/test_tracemethods.py                                  @DataDog/apm-core-python
tests/opentracer/core/test_dd_compatibility.py                          @DataDog/apm-core-python
tests/opentracer/core/test_tracer.py                                    @DataDog/apm-core-python
tests/opentracer/utils.py                                               @DataDog/apm-core-python
tests/tracer/test_sampler.py                                            @DataDog/apm-sdk-api-python

@pr-commenter
Copy link

pr-commenter bot commented Feb 3, 2025

Benchmarks

Benchmark execution time: 2025-02-04 16:41:02

Comparing candidate commit 514f5f2 in PR branch munir/remove-more-deprecated-code with baseline commit 2ccaaef in branch 3.x-staging.

Found 6 performance improvements and 0 performance regressions! Performance is the same for 388 metrics, 2 unstable metrics.

scenario:ratelimiter-defaults

  • 🟩 execution_time [-2.080µs; -2.038µs] or [-47.157%; -46.219%]

scenario:ratelimiter-high_rate_limit

  • 🟩 execution_time [-2.227µs; -2.197µs] or [-48.413%; -47.761%]

scenario:ratelimiter-long_window

  • 🟩 execution_time [-2.011µs; -1.983µs] or [-46.127%; -45.492%]

scenario:ratelimiter-low_rate_limit

  • 🟩 execution_time [-1.940µs; -1.911µs] or [-45.396%; -44.730%]

scenario:ratelimiter-no_rate_limit

  • 🟩 execution_time [-1.871µs; -1.853µs] or [-69.439%; -68.748%]

scenario:ratelimiter-short_window

  • 🟩 execution_time [-1.879µs; -1.849µs] or [-43.026%; -42.335%]

@mabdinur mabdinur force-pushed the munir/remove-more-deprecated-code branch from b73c911 to b1e9e58 Compare February 3, 2025 16:13
@mabdinur mabdinur marked this pull request as ready for review February 3, 2025 17:14
@mabdinur mabdinur requested review from a team as code owners February 3, 2025 17:14
@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Feb 3, 2025

Datadog Report

Branch report: munir/remove-more-deprecated-code
Commit report: 514f5f2
Test service: dd-trace-py

✅ 0 Failed, 130 Passed, 1184 Skipped, 3m 49.42s Total duration (24m 49.77s time saved)

@mabdinur mabdinur force-pushed the munir/remove-more-deprecated-code branch from cc52dd5 to 82f6481 Compare February 4, 2025 05:05
@mabdinur mabdinur force-pushed the munir/remove-more-deprecated-code branch from 82f6481 to a120739 Compare February 4, 2025 05:36
@mabdinur mabdinur enabled auto-merge (squash) February 4, 2025 12:59
#12186 removed deprecated
parameters from `tracer.configure(...)` and `rate_limiter.allowed(...)`
but did not update the microbenchmarks. This PR address this issue.

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [ ] Reviewer has checked that all the criteria below are met 
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
ddtrace/_trace/tracer.py Show resolved Hide resolved
ddtrace/opentracer/tracer.py Show resolved Hide resolved
tests/opentracer/core/test_tracer.py Show resolved Hide resolved
@mabdinur mabdinur merged commit 1245846 into 3.x-staging Feb 4, 2025
713 checks passed
@mabdinur mabdinur deleted the munir/remove-more-deprecated-code branch February 4, 2025 18:56
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.

3 participants