chore(pin): enforce the use of the global tracer#12219
chore(pin): enforce the use of the global tracer#12219mabdinur merged 16 commits into3.x-stagingfrom
Conversation
allow configuring dummy writers for civis fix broken tests update tracer fix stuff try to fix pytest address failues
|
|
20d6173 to
ddf975c
Compare
Datadog ReportBranch report: ✅ 0 Failed, 130 Passed, 1184 Skipped, 3m 30.08s Total duration (25m 14.77s time saved) |
BenchmarksBenchmark execution time: 2025-02-05 22:05:04 Comparing candidate commit 6ab7487 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 394 metrics, 2 unstable metrics. |
fix override logic fix get_from in testpin fix get_from attempt to fix pylibmc, tornado, and appsec tests rn
4bb07e1 to
3d7df40
Compare
This reverts commit 3d7df40.
689abc6 to
0040d26
Compare
a4a4aae to
bc1e8a2
Compare
erikayasuda
left a comment
There was a problem hiding this comment.
I think something weird happened with the branches. Just leaving one question here for now while that gets resolved 😅
erikayasuda
left a comment
There was a problem hiding this comment.
Just one nit question, LGTM otherwise. Thanks!
- Removes `tracer` parameter from `Pin.override()`, `Pin.clone()` and `Pin.__init__()`. `ddtrace.trace.Pin` can only be used with the global tracer. With this change User's can not modify integration to use custom tracers. - Introduces `Pin._tracer` and makes `Pin.tracer` an immutable property. This prevents users from modifying the tracer used by Pin objects while allowing maintainers to override the Pin._tracer in tests, - Updates tests to use `Pin._tracer`, `Pin._override()`, and `Pin._clone()`. - [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)) - [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) --------- Co-authored-by: erikayasuda <153395705+erikayasuda@users.noreply.github.com>
- Removes `tracer` parameter from `Pin.override()`, `Pin.clone()` and `Pin.__init__()`. `ddtrace.trace.Pin` can only be used with the global tracer. With this change User's can not modify integration to use custom tracers. - Introduces `Pin._tracer` and makes `Pin.tracer` an immutable property. This prevents users from modifying the tracer used by Pin objects while allowing maintainers to override the Pin._tracer in tests, - Updates tests to use `Pin._tracer`, `Pin._override()`, and `Pin._clone()`. ## 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) --------- Co-authored-by: erikayasuda <153395705+erikayasuda@users.noreply.github.com>
tracerparameter fromPin.override(),Pin.clone()andPin.__init__().ddtrace.trace.Pincan only be used with the global tracer. With this change User's can not modify integration to use custom tracers.Pin._tracerand makesPin.traceran immutable property. This prevents users from modifying the tracer used by Pin objects while allowing maintainers to override the Pin._tracer in tests,Pin._tracer,Pin._override(), andPin._clone().Checklist
Reviewer Checklist