Skip to content

feat(provider): expose context provider in ddtrace.trace [backport 2.20]#12137

Merged
mabdinur merged 2 commits into2.20from
backport-12135-to-2.20
Jan 29, 2025
Merged

feat(provider): expose context provider in ddtrace.trace [backport 2.20]#12137
mabdinur merged 2 commits into2.20from
backport-12135-to-2.20

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Backport cb41f8e from #12135 to 2.20.

ddtrace v3.0 is set to remove ddtrace.providers module from the public API. However we should still allow users to use their own ContextProviders. This PR ensures the BaseContextProvider remains in the public API and can be used in tracer.configure(...).

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

ddtrace v3.0 is set to remove `ddtrace.providers` module from the public
API. However we should still allow users to use their own
ContextProviders. This PR ensures the BaseContextProvider remains in the
public API and can be used in `tracer.configure(...)`.

## 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
- [x] 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)

(cherry picked from commit cb41f8e)
@github-actions github-actions Bot requested review from a team as code owners January 29, 2025 13:40
@datadog-dd-trace-py-rkomorn
Copy link
Copy Markdown

datadog-dd-trace-py-rkomorn Bot commented Jan 29, 2025

Datadog Report

Branch report: backport-12135-to-2.20
Commit report: 1acc54d
Test service: dd-trace-py

✅ 0 Failed, 130 Passed, 1468 Skipped, 4m 32.22s Total duration (35m 44.03s time saved)

@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Jan 29, 2025

Benchmarks

Benchmark execution time: 2025-01-29 23:52:59

Comparing candidate commit 1acc54d in PR branch backport-12135-to-2.20 with baseline commit ccd6f75 in branch 2.20.

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

@mabdinur mabdinur closed this Jan 29, 2025
@mabdinur mabdinur reopened this Jan 29, 2025
@mabdinur mabdinur enabled auto-merge (squash) January 29, 2025 20:42
@github-actions
Copy link
Copy Markdown
Contributor Author

CODEOWNERS have been resolved as:

releasenotes/notes/feat-expose-base-context-provider-530ebec2225f6c8d.yaml  @DataDog/apm-python
.github/CODEOWNERS                                                      @DataDog/python-guild @DataDog/apm-core-python
ddtrace/provider.py                                                     @DataDog/apm-sdk-api-python
ddtrace/trace/__init__.py                                               @DataDog/apm-sdk-api-python
docs/advanced_usage.rst                                                 @DataDog/python-guild

@mabdinur mabdinur merged commit f6d814c into 2.20 Jan 29, 2025
@mabdinur mabdinur deleted the backport-12135-to-2.20 branch January 29, 2025 23:54
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.

2 participants