Skip to content

Next Python SDK major - #5005

Draft
sentrivana wants to merge 120 commits into
masterfrom
major/3.0
Draft

Next Python SDK major#5005
sentrivana wants to merge 120 commits into
masterfrom
major/3.0

Conversation

@sentrivana

@sentrivana sentrivana commented Oct 24, 2025

Copy link
Copy Markdown
Contributor

We're preparing our next major on this branch.

The project is tracked in Linear. If you don't have access, we'll try to tag issues belonging to the project with the SDK 3.0 label on GitHub so that you can follow along.

Notable changes

  • Transaction-based tracing will be removed. Span streaming will be the default tracing model.
  • Python 3.6 support will be removed.

Context

You might have read this announcement about us discontinuing work on a 3.0. This is referring to the work done on the potel-base branch, which included two types of changes: a huge refactor of our tracing code on the one hand, and various unrelated changes, improvements and fixes on the other. We're dropping the huge refactor part, and only porting the rest, to a new branch and eventually a new 3.0 release.

Changes

@codecov

codecov Bot commented Oct 24, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.76%. Comparing base (14aff96) to head (d864ba0).
⚠️ Report is 4 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5005       +/-   ##
===========================================
+ Coverage   70.55%   83.76%   +13.21%     
===========================================
  Files         180      180               
  Lines       18077    18080        +3     
  Branches     3008     3009        +1     
===========================================
+ Hits        12754    15145     +2391     
+ Misses       4432     1943     -2489     
- Partials      891      992      +101     
Files with missing lines Coverage Δ
sentry_sdk/integrations/__init__.py 88.42% <100.00%> (+0.37%) ⬆️

... and 61 files with indirect coverage changes

@github-actions

github-actions Bot commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

110309 passed | ❌ 2 failed | ⏭️ 5424 skipped | Total: 115735 | Pass Rate: 95.31% | Execution Time: 379m 48s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -9292
Passed Tests 📉 -7986
Failed Tests 📈 +2
Skipped Tests 📉 -1308

➕ New Tests (2)

View new tests
  • test_cache_spans_templatetag[True]
    • File: tests.integrations.django.test_cache_module
    • Status: ❌ Failing
  • test_continuous_profiler_auto_start_and_stop_sampled[thread]
    • File: tests.profiler.test_continuous_profiler
    • Status: ❌ Failing

❌ Failed Tests

test_cache_spans_templatetag[True]

File: tests.integrations.django.test_cache_module
Suite: py3.10-django-v5.2.17
Error: tests/integrations/django/test_cache_module.py:480: in test_cache_spans_templatetag assert not spans[0]["attributes"]["cache.hit"] E assert not True

Stack Trace
tests/integrations/django/test_cache_module.py:480: in test_cache_spans_templatetag
    assert not spans[0]["attributes"]["cache.hit"]
E   assert not True

test_continuous_profiler_auto_start_and_stop_sampled[thread]

File: tests.profiler.test_continuous_profiler
Suite: py3.7-gevent
Error: AssertionError: profiler should not be running assert 'ef390e9fb7ea49b28a1e3c47b92325d2' is None + where 'ef390e9fb7ea49b28a1e3c47b92325d2' = get_profiler_id()

Stack Trace
tests/profiler/test_continuous_profiler.py:617: in test_continuous_profiler_auto_start_and_stop_sampled
    assert get_profiler_id() is None, "profiler should not be running"
E   AssertionError: profiler should not be running
E   assert 'ef390e9fb7ea49b28a1e3c47b92325d2' is None
E    +  where 'ef390e9fb7ea49b28a1e3c47b92325d2' = get_profiler_id()

✅ Patch coverage is 90.55%. Project has 2257 uncovered lines.
✅ Project coverage is 90.55%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    90.24%    90.55%    +0.31%
==========================================
  Files          193       185        -8
  Lines        25474     23880     -1594
  Branches      9378      8802      -576
==========================================
+ Hits         22988     21623     -1365
- Misses        2486      2257      -229
- Partials      1431      1370       -61

Generated by Codecov Action

@github-actions

github-actions Bot commented Mar 19, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (logging) Separate ignore lists for events/breadcrumbs and sentry logs by sl0thentr0py in #5698

Bug Fixes 🐛

Anthropic

  • Set exception info on streaming span when applicable by alexander-alderman-webb in #5683
  • Patch AsyncStream.close() and AsyncMessageStream.close() to finish spans by alexander-alderman-webb in #5675
  • Patch Stream.close() and MessageStream.close() to finish spans by alexander-alderman-webb in #5674

Documentation 📚

  • Add note on AI PRs to CONTRIBUTING.md by sentrivana in #5696

Internal Changes 🔧

  • Add -latest alias for each integration test suite by sentrivana in #5706
  • Use date-based branch names for toxgen PRs by sentrivana in #5704
  • 🤖 Update test matrix with new releases (03/19) by github-actions in #5703
  • Add client report tests for span streaming by sentrivana in #5677

Other

  • Next Python SDK major by sentrivana in #5005
  • Update CHANGELOG.md by sentrivana in #5685

🤖 This preview updates automatically when you update the PR.

Comment thread sentry_sdk/consts.py
sentrivana and others added 4 commits July 28, 2026 11:47
Add `UnraisablehookIntegration` to the default integrations list.
Stop raising exceptions `from None` in the ASGI and asyncio integrations.

Closes #5624
Remove everything hub related, including all sorts of compatibility
shims around hubs/scopes.

Also remove deprecated session methods.

`configure_scope` and `push_scope` removal coming in a future PR.

#### Issues
Closes #5001
The integration requires additional configuration which should be
intentional on the user's part.

#### Issues
Closes #4993
- Remove everything in `integrations/opentelemetry`
(`SentrySpanProcessor`, `SentryPropagator`, etc.)
- Remove associated test files and CI config
- Move old propagator functions and consts that we were using in
`OTLPIntegration` to the OTLP propagator directly
- Remove `instrumenter`

Note: `NoOpSpan` was not removed because it makes mypy blow up. Not
worth the effort as we'll anyway get rid of it when dropping transaction
based tracing.

#### Issues
Closes #6932
Comment thread sentry_sdk/integrations/otlp.py
### Description
The API is deprecated and slated for removal in 3.0.

#### Issues
Closes #5019

#### Reminders
- Please add tests to validate your changes, and lint your code using
`uv run ruff`.
- Add GH Issue ID _&_ Linear ID (if applicable)
- PR title should use [conventional
commit](https://develop.sentry.dev/engineering-practices/commit-messages/#type)
style (`feat:`, `fix:`, `ref:`, `meta:`)
- For external contributors:
[CONTRIBUTING.md](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md),
[Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord
community](https://discord.gg/Ww9hbqr)
### Description
Remove the deprecated API.

#### Issues
Closes #5018
…new major (#6948)

### Description
When `failed_request_status_codes` was first introduced, it accepted a
different format. The format was then changed, while the old format was
deprecated. Drop support for the old format now.

#### Issues
Closes #5017
### Description
Most of the entries in our extras list serve as a way to
communicate/enforce the lower boundary of the respective framework that
we support. This creates a parallel system to the version checks we
already have in each integration.

Some extras, however, define extra dependencies or specific extras that
are required for an integration to work correctly (e.g. the Flask
integration needs `blinker` to work properly). In that case, keep the
extra.

#### Issues
Closes #6259
Comment thread tests/integrations/django/asgi/test_asgi.py
sentrivana and others added 8 commits August 25, 2026 11:48
The renovate regex manager is configured to use GitHub tags.

The `getsentry/codecov-action` action was previously not updated in `test_orchestrator.jinja`.
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[anthropics/claude-code-action](https://redirect.github.com/anthropics/claude-code-action)
| action | patch | `v1.0.191` → `v1.0.201` |
| [astral-sh/setup-uv](https://redirect.github.com/astral-sh/setup-uv) |
| patch | `v10.0.0` → `v10.0.1` |
| [astral-sh/setup-uv](https://redirect.github.com/astral-sh/setup-uv) |
action | patch | `v10.0.0` → `v10.0.1` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the [Dependency
Dashboard](../issues/6715) for more information.

---

### Release Notes

<details>
<summary>anthropics/claude-code-action
(anthropics/claude-code-action)</summary>

###
[`v1.0.201`](https://redirect.github.com/anthropics/claude-code-action/releases/tag/v1.0.201)

[Compare
Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.200...v1.0.201)

**Full Changelog**:
<anthropics/claude-code-action@v1.0.200...v1.0.201>

###
[`v1.0.200`](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.199...v1.0.200)

[Compare
Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.199...v1.0.200)

###
[`v1.0.199`](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.198...v1.0.199)

[Compare
Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.198...v1.0.199)

###
[`v1.0.198`](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.197...v1.0.198)

[Compare
Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.197...v1.0.198)

###
[`v1.0.197`](https://redirect.github.com/anthropics/claude-code-action/releases/tag/v1.0.197)

[Compare
Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.196...v1.0.197)

#### What's Changed

- fix: neutralize the checkout credential under actions/checkout v6+
include layout
([#&#8203;1510](https://redirect.github.com/anthropics/claude-code-action/issues/1510))
by [@&#8203;TemRevil](https://redirect.github.com/TemRevil) in
[#&#8203;1526](https://redirect.github.com/anthropics/claude-code-action/pull/1526)

#### New Contributors

- [@&#8203;TemRevil](https://redirect.github.com/TemRevil) made their
first contribution in
[#&#8203;1526](https://redirect.github.com/anthropics/claude-code-action/pull/1526)

**Full Changelog**:
<anthropics/claude-code-action@v1.0.196...v1.0.197>

###
[`v1.0.196`](https://redirect.github.com/anthropics/claude-code-action/releases/tag/v1.0.196)

[Compare
Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.195...v1.0.196)

##### What's Changed

- fix(security): unify secret redaction in public comment outputs by
[@&#8203;Juwan-Hwang](https://redirect.github.com/Juwan-Hwang) in
[#&#8203;1693](https://redirect.github.com/anthropics/claude-code-action/pull/1693)
- fix: strip unused ALL\_INPUTS environment variable from Claude
subprocess env by
[@&#8203;Juwan-Hwang](https://redirect.github.com/Juwan-Hwang) in
[#&#8203;1692](https://redirect.github.com/anthropics/claude-code-action/pull/1692)
- fix(github): match bot actors in comment filters using GraphQL
\_\_typename by [@&#8203;Neal006](https://redirect.github.com/Neal006)
in
[#&#8203;1616](https://redirect.github.com/anthropics/claude-code-action/pull/1616)

##### New Contributors

- [@&#8203;Juwan-Hwang](https://redirect.github.com/Juwan-Hwang) made
their first contribution in
[#&#8203;1693](https://redirect.github.com/anthropics/claude-code-action/pull/1693)

**Full Changelog**:
<anthropics/claude-code-action@v1.0.195...v1.0.196>

###
[`v1.0.195`](https://redirect.github.com/anthropics/claude-code-action/releases/tag/v1.0.195)

[Compare
Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.194...v1.0.195)

**Full Changelog**:
<anthropics/claude-code-action@v1.0.194...v1.0.195>

###
[`v1.0.194`](https://redirect.github.com/anthropics/claude-code-action/releases/tag/v1.0.194)

[Compare
Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.193...v1.0.194)

#### What's Changed

- Harden delete\_files MCP tool: validate paths within repo root
(consistency with commit\_files) by
[@&#8203;GabrielOnRails](https://redirect.github.com/GabrielOnRails) in
[#&#8203;1636](https://redirect.github.com/anthropics/claude-code-action/pull/1636)
- Only limit fetch depth when the checkout is already shallow by
[@&#8203;winklemad](https://redirect.github.com/winklemad) in
[#&#8203;1647](https://redirect.github.com/anthropics/claude-code-action/pull/1647)
- fix(base-action): add \~/.local/bin to $GITHUB\_PATH after
auto-install by [@&#8203;anishesg](https://redirect.github.com/anishesg)
in
[#&#8203;1643](https://redirect.github.com/anthropics/claude-code-action/pull/1643)
- feat(context): include diffHunk in PR review comment context by
[@&#8203;rishavnaskar](https://redirect.github.com/rishavnaskar) in
[#&#8203;1584](https://redirect.github.com/anthropics/claude-code-action/pull/1584)
- ci: skip Claude-backed test jobs on fork PRs by
[@&#8203;ashwin-ant](https://redirect.github.com/ashwin-ant) in
[#&#8203;1655](https://redirect.github.com/anthropics/claude-code-action/pull/1655)
- fix: bump shell-quote to 1.8.4 to remediate CVE-2026-9277 by
[@&#8203;doshidhaval](https://redirect.github.com/doshidhaval) in
[#&#8203;1557](https://redirect.github.com/anthropics/claude-code-action/pull/1557)
- fix(images): bound attachment downloads by
[@&#8203;abhinavkr26104](https://redirect.github.com/abhinavkr26104) in
[#&#8203;1625](https://redirect.github.com/anthropics/claude-code-action/pull/1625)

#### New Contributors

- [@&#8203;GabrielOnRails](https://redirect.github.com/GabrielOnRails)
made their first contribution in
[#&#8203;1636](https://redirect.github.com/anthropics/claude-code-action/pull/1636)
- [@&#8203;winklemad](https://redirect.github.com/winklemad) made their
first contribution in
[#&#8203;1647](https://redirect.github.com/anthropics/claude-code-action/pull/1647)
- [@&#8203;doshidhaval](https://redirect.github.com/doshidhaval) made
their first contribution in
[#&#8203;1557](https://redirect.github.com/anthropics/claude-code-action/pull/1557)

**Full Changelog**:
<anthropics/claude-code-action@v1.0.193...v1.0.194>

###
[`v1.0.193`](https://redirect.github.com/anthropics/claude-code-action/releases/tag/v1.0.193)

[Compare
Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.192...v1.0.193)

**Full Changelog**:
<anthropics/claude-code-action@v1.0.192...v1.0.193>

###
[`v1.0.192`](https://redirect.github.com/anthropics/claude-code-action/releases/tag/v1.0.192)

[Compare
Source](https://redirect.github.com/anthropics/claude-code-action/compare/v1.0.191...v1.0.192)

#### What's Changed

- fix(mcp): paginate GitHub Actions results by
[@&#8203;abhinavkr26104](https://redirect.github.com/abhinavkr26104) in
[#&#8203;1629](https://redirect.github.com/anthropics/claude-code-action/pull/1629)
- fix(summary): keep every text block in structured tool results by
[@&#8203;Neal006](https://redirect.github.com/Neal006) in
[#&#8203;1619](https://redirect.github.com/anthropics/claude-code-action/pull/1619)
- fix(mcp): detect binary files by content instead of extension
allowlist by
[@&#8203;henriquepe](https://redirect.github.com/henriquepe) in
[#&#8203;1633](https://redirect.github.com/anthropics/claude-code-action/pull/1633)

#### New Contributors

- [@&#8203;abhinavkr26104](https://redirect.github.com/abhinavkr26104)
made their first contribution in
[#&#8203;1629](https://redirect.github.com/anthropics/claude-code-action/pull/1629)
- [@&#8203;Neal006](https://redirect.github.com/Neal006) made their
first contribution in
[#&#8203;1619](https://redirect.github.com/anthropics/claude-code-action/pull/1619)
- [@&#8203;henriquepe](https://redirect.github.com/henriquepe) made
their first contribution in
[#&#8203;1633](https://redirect.github.com/anthropics/claude-code-action/pull/1633)

**Full Changelog**:
<anthropics/claude-code-action@v1.0.191...v1.0.192>

</details>

<details>
<summary>astral-sh/setup-uv (astral-sh/setup-uv)</summary>

###
[`v10.0.1`](https://redirect.github.com/astral-sh/setup-uv/releases/tag/v10.0.1):
🌈 Tolerate transient manifest timeouts

[Compare
Source](https://redirect.github.com/astral-sh/setup-uv/compare/v10.0.0...v10.0.1)

##### Changes

Thank you [@&#8203;arguile-](https://redirect.github.com/arguile-) for
making this action more resilient.

##### 🐛 Bug fixes

- Tolerate transient manifest timeouts
[@&#8203;arguile-](https://redirect.github.com/arguile-)
([#&#8203;1016](https://redirect.github.com/astral-sh/setup-uv/issues/1016))

##### 🧰 Maintenance

- chore: update known checksums for 0.12.4
@&#8203;[github-actions\[bot\]](https://redirect.github.com/apps/github-actions)
([#&#8203;1017](https://redirect.github.com/astral-sh/setup-uv/issues/1017))

##### 📚 Documentation

- docs: update version references to v10.0.0
@&#8203;[github-actions\[bot\]](https://redirect.github.com/apps/github-actions)
([#&#8203;1014](https://redirect.github.com/astral-sh/setup-uv/issues/1014))

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config
help](https://redirect.github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/getsentry/sentry-python).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4yNC4wIiwidXBkYXRlZEluVmVyIjoiNDQuMzkuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…#7201)

The sync request/response handler passed the _isolation_ scope to
`_set_transaction_name_and_source`, but the transaction/segment span
lives on the _current_ scope. As a result the route-resolved name never
reached the span for sync endpoints, which were instead named by the raw
URL from the ASGI middleware (`transaction_info.source` of `url` rather
than `route`). Async handlers already used the current scope and were
unaffected.

Pass the current scope (already computed above) so sync and async
handlers behave identically:
- streaming: the segment name / `sentry.segment.name.source` are
route-based
- static: the transaction event name / source are route-based

For parametrized routes this also removes high-cardinality URL
transaction names for sync endpoints.

Found while working on
#7183.
Comment thread sentry_sdk/integrations/otlp.py
Comment thread sentry_sdk/integrations/aiomysql.py
Comment thread sentry_sdk/integrations/aiomysql.py
Comment thread MIGRATION_GUIDE.md Outdated
Comment thread sentry_sdk/integrations/otlp.py
Comment thread sentry_sdk/integrations/pyramid.py
Comment thread sentry_sdk/integrations/strawberry.py
Comment thread tests/integrations/aiomysql/test_aiomysql.py
Comment thread tests/integrations/aiomysql/test_aiomysql.py
Comment thread tests/integrations/aiomysql/test_aiomysql.py
Comment thread sentry_sdk/integrations/stdlib.py
Comment thread sentry_sdk/integrations/stdlib.py
Comment thread sentry_sdk/integrations/__init__.py
Comment thread sentry_sdk/integrations/threading.py
Comment thread tests/integrations/bottle/test_bottle.py
Comment thread tests/integrations/httpx/test_httpx.py
### Description
The timeout in the AWS Lambda (and GCP, by extension) timeout warning is
wrong, remove it and slightly rephrase.

This is on the new major branch since it breaks grouping. (Even just
removing the number from the original message, without modifying it
further, causes regrouping. Since that's the case I took the liberty to
update the message a bit more.)

Original POTel PR: #4671

#### Issues
Closes
https://linear.app/getsentry/issue/PY-1937/change-aws-lambda-timeout-message

#### Reminders
- Please add tests to validate your changes, and lint your code using
`uv run ruff`.
- Add GH Issue ID _&_ Linear ID (if applicable)
- PR title should use [conventional
commit](https://develop.sentry.dev/engineering-practices/commit-messages/#type)
style (`feat:`, `fix:`, `ref:`, `meta:`)
- For external contributors:
[CONTRIBUTING.md](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md),
[Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord
community](https://discord.gg/Ww9hbqr)
sentrivana added a commit that referenced this pull request Aug 26, 2026
Originally raised by a bot
[here](#5005 (comment)):
the `parse_version` function parses version strings as is (e.g. 3.1
becomes `(3, 1)`). We use these parsed version tuples in integrations to
compare the installed version against the minimum (defined in
`integrations/__init__.py`). The minimum versions are often three-part,
e.g. `(3, 1, 0)`.

This means that we can mistakenly consider a valid version to be below
the minimum, because in pure tuple terms, `(3, 1) < (3, 1, 0)` is true.

This can also happen in reverse (package version has three parts, while
our min version boundary has two).

In this PR, we make the internal version comparison work as expected
regardless of mismatches in the length of the version strings/tuples.
Comment thread sentry_sdk/integrations/typer.py
Comment thread sentry_sdk/_init_implementation.py
Comment on lines +109 to 123
with sentry_sdk.traces.start_span(
name="unknown arq task",
status="ok",
op=OP.QUEUE_TASK_ARQ,
source=TransactionSource.TASK,
origin=ArqIntegration.origin,
)

with sentry_sdk.start_transaction(transaction) as span:
attributes={
"sentry.op": OP.QUEUE_TASK_ARQ,
"sentry.origin": ArqIntegration.origin,
"sentry.segment.name.source": SegmentNameSource.TASK,
SPANDATA.MESSAGING_MESSAGE_ID: job_id,
},
parent_span=None,
) as span:
if self.queue_name is not None:
span.set_data(SPANDATA.MESSAGING_DESTINATION_NAME, self.queue_name)
span.set_attribute(
SPANDATA.MESSAGING_DESTINATION_NAME, self.queue_name
)
return await old_run_job(self, job_id, score)

@sentry-warden sentry-warden Bot Aug 26, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed ARQ task spans keep status ok under span streaming

After switching run_job to streamed spans, _capture_exception still only sets status via scope.transaction, which is always None in streaming mode—so failed task segments stay ok unless the exception happens to escape ARQ. Update _capture_exception to set scope.streamed_span.status (as Celery does) and assert error status in the failure tests.

Evidence
  • This hunk makes traces.start_span(..., parent_span=None) the only task path in _sentry_run_job.
  • _capture_exception still does if scope.transaction is not None: scope.transaction.set_status(...).
  • In streaming mode, Scope.transaction returns None, so that status update is a no-op.
  • ARQ job failures are typically handled inside Worker.run_job, so the streamed span __exit__ often never sees the exception to mark error itself.
  • Celery already maps this via scope.streamed_span.status; ARQ tests assert failure events but not task-span status.

Identified by Warden · code-review, find-bugs · LZ3-SDG

Comment thread sentry_sdk/integrations/asgi.py
Comment thread sentry_sdk/integrations/strawberry.py
Comment thread sentry_sdk/integrations/redis/redis.py
Comment thread sentry_sdk/integrations/stdlib.py
### Description
Getting rid of custom APIs.

`update_current_span` never worked with span streaming anyway.


#### Issues
Part of https://linear.app/getsentry/issue/PY-2623/drop-custom-apis
Part of #6894

#### Reminders
- Please add tests to validate your changes, and lint your code using
`uv run ruff`.
- Add GH Issue ID _&_ Linear ID (if applicable)
- PR title should use [conventional
commit](https://develop.sentry.dev/engineering-practices/commit-messages/#type)
style (`feat:`, `fix:`, `ref:`, `meta:`)
- For external contributors:
[CONTRIBUTING.md](https://github.com/getsentry/sentry-python/blob/master/CONTRIBUTING.md),
[Sentry SDK development docs](https://develop.sentry.dev/sdk/), [Discord
community](https://discord.gg/Ww9hbqr)
### Description
Many of the `set_tag` calls were only present in non-span-streaming
branches, which will be completely removed anyway, and we've already
migrated those tags, if applicable, to span attributes in the scope of
span first.


#### Issues
Closes
https://linear.app/getsentry/issue/PY-1940/remove-tags-auto-set-by-the-sdk
### Description
Get the logging integration into shape now that Sentry Logs is a
first-class feature. The idea is to make Logs the primary feature the
integration offers, with capturing events an optional add-on.

High-level overview of the changes:
- The integration has to be **enabled explicitly** by the user. It's not
auto-enabled anymore.
- **Sentry logs related options and features get more generic sounding
names**.
- For instance, `level` (before: `sentry_logs_level`), `ignore_logger`
(before: `ignore_logger_for_sentry_logs`) now set the Sentry logs level
and Sentry logs denylist, respectively.
- Existing secondary features with previously generic names get
specialized names (`level` -> `breadcrumb_level`, `ignore_logger` ->
`ignore_logger_for_events`).
- **Capturing Sentry logs is on by default** when the integration is
enabled.
- **Event capture is off by default**, but can be turned on via an
option. Breadcrumb capture is still on by default.
- The **`capture_sentry_logs` option is gone completely**. Since logs
instrumentation is now on by default, and the `level` option exists, it
was superfluous. Capturing logs can still be opted out of by setting
`level=None`.

Collateral:
- Updated unrelated tests that were implicitly relying on default
behavior of the logging integration

#### Issues
Closes #7246
Closes
https://linear.app/getsentry/issue/PY-2739/update-logging-integration
### Description
Get the Loguru integration into shape now that Sentry Logs is a
first-class feature. The idea is to make Logs the primary feature the
integration offers, with capturing events an optional add-on.

High-level overview of the changes:
- The integration has to be **enabled explicitly** by the user. It's not
auto-enabled anymore.
- **Sentry logs related options and features get more generic sounding
names**.
- For instance, `level` (before: `sentry_logs_level`) now sets the
Sentry logs level.
- Existing secondary features with previously generic names get
specialized names (`level` -> `breadcrumb_level`).
- **Capturing Sentry logs is on by default** when the integration is
enabled.
- **Event capture is off by default**, but can be turned on via an
option. Breadcrumb capture is still on by default.
- The **`capture_sentry_logs` option is gone completely**. Since logs
instrumentation is now on by default, and the `level` option exists, it
was superfluous. Capturing logs can still be opted out of by setting
`level=None`.

#### Issues
Closes #7247
Closes
https://linear.app/getsentry/issue/PY-2740/update-loguru-integration
Comment thread MIGRATION_GUIDE.md
Comment on lines +117 to +130
- The `enable_logs` option was removed. Using Sentry's logging API now works without requiring setting `enable_logs=True`. Automatic capture of logs emitted by the `logging` standard library module or Loguru can be turned on by providing the `capture_sentry_logs=True` option to either `LoggingIntegration` or `LoguruIntegration`:

```python
import sentry_sdk
from sentry_sdk.integrations.logging import LoggingIntegration
from sentry_sdk.integrations.loguru import LoguruIntegration

sentry_sdk.init(
integrations=[
LoggingIntegration(capture_sentry_logs=True),
LoguruIntegration(capture_sentry_logs=True),
]
)
```

@sentry-warden sentry-warden Bot Aug 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Migration guide's logging example uses the removed capture_sentry_logs option

The SDK 3.x migration guide instructs users to initialize LoggingIntegration and LoguruIntegration with capture_sentry_logs=True, but both constructors reject that keyword with TypeError. Update the example to use the new level option, or omit it because level defaults to INFO.

Evidence
  • LoggingIntegration.__init__ accepts level, event_level, and breadcrumb_level; it has no capture_sentry_logs parameter.
  • LoguruIntegration.__init__ likewise accepts level, event_level, and formatting/breadcrumb options, but not capture_sentry_logs.
  • The guide previously states that capture_sentry_logs was removed and recommends level=None to disable capture, contradicting the example in the Removed section.
  • Following the example therefore raises TypeError while initializing either integration.
Also found at 1 additional location
  • sentry_sdk/consts.py:1345-1345

Identified by Warden · code-review, find-bugs · PSD-4YZ

Comment thread MIGRATION_GUIDE.md
- The `level` integration option is now called `breadcrumb_level`.
- The `sentry_logs_level` integration option is now called `level`.
- The `capture_sentry_logs` option was removed. Use `level=None` to disable log capture.
- The `ignore_logger` helper was renamed to `ignore_logger_for_breadcrumbs_and_events`.

@sentry-warden sentry-warden Bot Aug 27, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore_logger rename target does not match the real API

The bullet renames ignore_logger to ignore_logger_for_breadcrumbs_and_events, but the real function and the table below both use ignore_logger_for_events.

Evidence
  • sentry_sdk/integrations/logging.py defines ignore_logger_for_events and unignore_logger_for_events, not ignore_logger_for_breadcrumbs_and_events.
  • Integrations such as aiohttp, celery, rq, and tornado import and call ignore_logger_for_events.
  • The migration table on line 57 already maps ignore_loggerignore_logger_for_events, contradicting the bullet on line 46.

Identified by Warden · code-review, find-bugs · R6Q-HNJ

Comment thread sentry_sdk/consts.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants