---
name: Sentry Python
slug: sentry-python
type: github
source_url: https://github.com/getsentry/sentry-python
changelog_url: https://github.com/getsentry/sentry-python/blob/HEAD/CHANGELOG.md
organization: Sentry
organization_slug: sentry
total_releases: 193
latest_version: 2.58.0
latest_date: 2026-04-13
last_updated: 2026-04-19
tracking_since: 2021-07-06
canonical: https://releases.sh/sentry/sentry-python
organization_url: https://releases.sh/sentry
---

<Summary type="rolling" window-days="90" release-count="19">
The SDK shipped extensive AI instrumentation work, expanding beyond OpenAI and Anthropic to cover broader provider ecosystems and streaming patterns. Langchain support gained `gen_ai.operation.name` and `gen_ai.pipeline.name` span attributes with detection for providers beyond OpenAI and Anthropic, while Anthropic streaming—both synchronous and asynchronous—now emits proper `gen_ai.chat` spans with finish reason recording. On the platform side, an experimental async transport arrived alongside new global APIs for setting and removing attributes on logs and metrics independently of transaction/error contexts, and the asyncio integration gained on-demand enablement for multi-loop scenarios.
</Summary>

<Summary type="monthly" period="February 2026" release-count="9">
Focused on AI integrations and span streaming infrastructure. Version 2.52.0 shipped fixes across OpenAI, Google Genai, MCP, and Anthropic integrations—token reporting corrections and proper nesting of MCP spans under HTTP transactions. The 2.52.0 alpha series developed span streaming capabilities with a new batcher and telemetry pipeline integration, while 2.53.0 patched OpenAI Agents functions following a library refactor.
</Summary>

<Release version="2.58.0" date="April 13, 2026" published="2026-04-13T17:23:45.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.58.0">
### New Features ✨

- (ai) Redact base64 data URLs in image_url content blocks by @ericapisani in [#5953](https://github.com/getsentry/sentry-python/pull/5953)
- (integrations) Instrument pyreqwest tracing by @servusdei2018 in [#5682](https://github.com/getsentry/sentry-python/pull/5682)
- (litellm) Add async callbacks by @alexander-alderman-webb in [#5969](https://github.com/getsentry/sentry-python/pull/5969)

### Bug Fixes 🐛

#### Anthropic

- Capture exceptions for `stream()` calls by @alexander-alderman-webb in [#5950](https://github.com/getsentry/sentry-python/pull/5950)
- Stop setting transaction status when child span fails by @alexander-alderman-webb in [#5717](https://github.com/getsentry/sentry-python/pull/5717)
- Only finish relevant spans in .create() patches by @alexander-alderman-webb in [#5716](https://github.com/getsentry/sentry-python/pull/5716)

#### Pydantic Ai

- Adapt import for new library versions by @alexander-alderman-webb in [#5984](https://github.com/getsentry/sentry-python/pull/5984)
- Use first-class hooks when available by @alexander-alderman-webb in [#5947](https://github.com/getsentry/sentry-python/pull/5947)

#### Other

- (huggingface_hub) Stop setting transaction status when a child span fails by @Zenithatic in [#5952](https://github.com/getsentry/sentry-python/pull/5952)
- (litellm) Avoid double span exits when streaming by @alexander-alderman-webb in [#5933](https://github.com/getsentry/sentry-python/pull/5933)
- (wsgi) Respect HTTP_X_FORWARDED_PROTO in request.url construction by @sl0thentr0py in [#5963](https://github.com/getsentry/sentry-python/pull/5963)

### Internal Changes 🔧

#### Litellm

- Replace mocks with `httpx` types in rate-limit test by @alexander-alderman-webb in [#5975](https://github.com/getsentry/sentry-python/pull/5975)
- Replace mocks with `httpx` types in embedding tests by @alexander-alderman-webb in [#5970](https://github.com/getsentry/sentry-python/pull/5970)
- Replace mocks with `httpx` types in nonstreaming `completion()` tests by @alexander-alderman-webb in [#5937](https://github.com/getsentry/sentry-python/pull/5937)
- Remove dead attributes by @alexander-alderman-webb in [#5985](https://github.com/getsentry/sentry-python/pull/5985)

#### Other

- (ai) Remove `gen_ai.tool.type` span attribute by @ericapisani in [#5964](https://github.com/getsentry/sentry-python/pull/5964)
- (anthropic) Separate sync and async .create() patches by @alexander-alderman-webb in [#5715](https://github.com/getsentry/sentry-python/pull/5715)
- (openai) Split token counting by API for easier deprecation by @ericapisani in [#5930](https://github.com/getsentry/sentry-python/pull/5930)
- (openai-agents) Remove error attributes by @alexander-alderman-webb in [#5986](https://github.com/getsentry/sentry-python/pull/5986)
- (opentelemetry) Ignore mypy error by @alexander-alderman-webb in [#5927](https://github.com/getsentry/sentry-python/pull/5927)
- 🤖 Update test matrix with new releases (04/13) by @github-actions in [#5983](https://github.com/getsentry/sentry-python/pull/5983)
- Fix license metadata in setup.py by @sl0thentr0py in [#5934](https://github.com/getsentry/sentry-python/pull/5934)
- Update validate-pr workflow by @stephanie-anderson in [#5931](https://github.com/getsentry/sentry-python/pull/5931)

### Other

- Handle `None` span context in the span processor and pin tokenizers version for anthropic tests on Python 3.8 by @alexander-alderman-webb in [#5967](https://github.com/getsentry/sentry-python/pull/5967)
</Release>

<Release version="2.57.0" date="March 31, 2026" published="2026-03-31T09:39:53.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.57.0">
### New Features ✨

#### Langchain

- Set `gen_ai.operation.name` and `gen_ai.pipeline.name` on LLM spans by @ericapisani in [#5849](https://github.com/getsentry/sentry-python/pull/5849)
- Broaden AI provider detection beyond OpenAI and Anthropic by @ericapisani in [#5707](https://github.com/getsentry/sentry-python/pull/5707)
- Update LLM span operation to `gen_ai.generate_text` by @ericapisani in [#5796](https://github.com/getsentry/sentry-python/pull/5796)

#### Other

- Add experimental async transport by @BYK in [#5646](https://github.com/getsentry/sentry-python/pull/5646)

  See https://github.com/getsentry/sentry-python/discussions/5919 for details.

### Bug Fixes 🐛

#### Openai

- Only wrap types with `_iterator` for streamed responses by @alexander-alderman-webb in [#5917](https://github.com/getsentry/sentry-python/pull/5917)
- Always set `gen_ai.response.streaming` for Responses by @alexander-alderman-webb in [#5697](https://github.com/getsentry/sentry-python/pull/5697)
- Simplify Responses input handling by @alexander-alderman-webb in [#5695](https://github.com/getsentry/sentry-python/pull/5695)
- Use `max_output_tokens` for Responses API by @alexander-alderman-webb in [#5693](https://github.com/getsentry/sentry-python/pull/5693)
- Always set `gen_ai.response.streaming` for Completions by @alexander-alderman-webb in [#5692](https://github.com/getsentry/sentry-python/pull/5692)
- Simplify Completions input handling by @alexander-alderman-webb in [#5690](https://github.com/getsentry/sentry-python/pull/5690)
- Simplify embeddings input handling by @alexander-alderman-webb in [#5688](https://github.com/getsentry/sentry-python/pull/5688)

#### Other

- (google-genai) Guard response extraction by @alexander-alderman-webb in [#5869](https://github.com/getsentry/sentry-python/pull/5869)
- Add cycle detection to exceptions_from_error by @ericapisani in [#5880](https://github.com/getsentry/sentry-python/pull/5880)

### Internal Changes 🔧

#### Ai

- Remove unused GEN_AI_PIPELINE operation constant by @ericapisani in [#5886](https://github.com/getsentry/sentry-python/pull/5886)
- Rename generate_text to text_completion by @ericapisani in [#5885](https://github.com/getsentry/sentry-python/pull/5885)

#### Langchain

- Add text completion test by @alexander-alderman-webb in [#5740](https://github.com/getsentry/sentry-python/pull/5740)
- Add tool execution test by @alexander-alderman-webb in [#5739](https://github.com/getsentry/sentry-python/pull/5739)
- Add basic agent test with Responses call by @alexander-alderman-webb in [#5726](https://github.com/getsentry/sentry-python/pull/5726)
- Replace mocks with `httpx` types by @alexander-alderman-webb in [#5724](https://github.com/getsentry/sentry-python/pull/5724)
- Consolidate span origin assertion by @alexander-alderman-webb in [#5723](https://github.com/getsentry/sentry-python/pull/5723)
- Consolidate available tools assertion by @alexander-alderman-webb in [#5721](https://github.com/getsentry/sentry-python/pull/5721)

#### Openai

- Replace mocks with httpx types for streaming Responses by @alexander-alderman-webb in [#5882](https://github.com/getsentry/sentry-python/pull/5882)
- Replace mocks with httpx types for streaming Completions by @alexander-alderman-webb in [#5879](https://github.com/getsentry/sentry-python/pull/5879)
- Move input handling code into API-specific functions by @alexander-alderman-webb in [#5687](https://github.com/getsentry/sentry-python/pull/5687)

#### Other

- (asyncpg) Normalize query whitespace in integration by @ericapisani in [#5855](https://github.com/getsentry/sentry-python/pull/5855)
- Exclude compromised litellm versions by @alexander-alderman-webb in [#5876](https://github.com/getsentry/sentry-python/pull/5876)
</Release>

<Release version="2.52.0a9" date="March 26, 2026" published="2026-03-26T13:30:16.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.52.0a9">
This is an alpha release for internal testing.
</Release>

<Release version="2.56.0" date="March 24, 2026" published="2026-03-24T09:56:57.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.56.0">
### New Features ✨

- (asgi) Add option to disable suppressing chained exceptions by @alexander-alderman-webb in [#5714](https://github.com/getsentry/sentry-python/pull/5714)
- (logging) Separate ignore lists for events/breadcrumbs and sentry logs by @sl0thentr0py in [#5698](https://github.com/getsentry/sentry-python/pull/5698)

### Bug Fixes 🐛

#### Anthropic

- Set exception info on streaming span when applicable by @alexander-alderman-webb in [#5683](https://github.com/getsentry/sentry-python/pull/5683)
- Patch `AsyncStream.close()` and `AsyncMessageStream.close()` to finish spans by @alexander-alderman-webb in [#5675](https://github.com/getsentry/sentry-python/pull/5675)
- Patch `Stream.close()` and `MessageStream.close()` to finish spans by @alexander-alderman-webb in [#5674](https://github.com/getsentry/sentry-python/pull/5674)

#### Other

- (starlette) Catch Jinja2Templates ImportError by @alexander-alderman-webb in [#5741](https://github.com/getsentry/sentry-python/pull/5741)

### Documentation 📚

- Add note on AI PRs to CONTRIBUTING.md by @sentrivana in [#5696](https://github.com/getsentry/sentry-python/pull/5696)

### Internal Changes 🔧

- Pin GitHub Actions to full-length commit SHAs by @joshuarli in [#5781](https://github.com/getsentry/sentry-python/pull/5781)
- Add `-latest` alias for each integration test suite by @sentrivana in [#5706](https://github.com/getsentry/sentry-python/pull/5706)
- Use date-based branch names for toxgen PRs by @sentrivana in [#5704](https://github.com/getsentry/sentry-python/pull/5704)
- 🤖 Update test matrix with new releases (03/19) by @github-actions in [#5703](https://github.com/getsentry/sentry-python/pull/5703)
- Add client report tests for span streaming by @sentrivana in [#5677](https://github.com/getsentry/sentry-python/pull/5677)

### Other

- Update CHANGELOG.md by @sentrivana in [#5685](https://github.com/getsentry/sentry-python/pull/5685)
</Release>

<Release version="2.55.0" date="March 17, 2026" published="2026-03-17T14:16:13.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.55.0">
### New Features ✨

#### Anthropic

- Record finish reasons in AI monitoring spans by @ericapisani in [#5678](https://github.com/getsentry/sentry-python/pull/5678)
- Emit `gen_ai.chat` spans for asynchronous `messages.stream()` by @alexander-alderman-webb in [#5572](https://github.com/getsentry/sentry-python/pull/5572)
- Emit AI Client Spans for synchronous `messages.stream()` by @alexander-alderman-webb in [#5565](https://github.com/getsentry/sentry-python/pull/5565)
- Set gen_ai.response.id span attribute by @ericapisani in [#5662](https://github.com/getsentry/sentry-python/pull/5662)
- Add `gen_ai.system` attribute to spans by @ericapisani in [#5661](https://github.com/getsentry/sentry-python/pull/5661)

#### Pydantic Ai

- Support ImageUrl content type in span instrumentation by @ericapisani in [#5629](https://github.com/getsentry/sentry-python/pull/5629)
- Add tool description to execute_tool spans by @ericapisani in [#5596](https://github.com/getsentry/sentry-python/pull/5596)

#### Other

- (crons) Add owner field to MonitorConfig by @julwhitney13 in [#5610](https://github.com/getsentry/sentry-python/pull/5610)
- (otlp) Add collector_url option to OTLPIntegration by @sl0thentr0py in [#5603](https://github.com/getsentry/sentry-python/pull/5603)

### Bug Fixes 🐛

- (ai) Truncate list-based message content in AI monitoring by @ericapisani in [#5631](https://github.com/getsentry/sentry-python/pull/5631)
- (anthropic) Close span on `GeneratorExit` by @alexander-alderman-webb in [#5643](https://github.com/getsentry/sentry-python/pull/5643)
- (celery) Propagate user-set headers by @sentrivana in [#5581](https://github.com/getsentry/sentry-python/pull/5581)
- (langchain) Wrap finish_reason in array for gen_ai span attribute by @ericapisani in [#5666](https://github.com/getsentry/sentry-python/pull/5666)
- (logging) Fix deadlock in log batcher by @sentrivana in [#5684](https://github.com/getsentry/sentry-python/pull/5684)
- (profiler) Prevent buffer race condition during rapid start/stop cycles by @ericapisani in [#5622](https://github.com/getsentry/sentry-python/pull/5622)
- (utils) Avoid double serialization of strings in safe_serialize by @ericapisani in [#5587](https://github.com/getsentry/sentry-python/pull/5587)
- Enable unused import ruff check and fix unused imports by @sentrivana in [#5652](https://github.com/getsentry/sentry-python/pull/5652)

### Documentation 📚

- (openai-agents) Remove inapplicable comment by @alexander-alderman-webb in [#5495](https://github.com/getsentry/sentry-python/pull/5495)
- Add AGENTS.md by @sentrivana in [#5579](https://github.com/getsentry/sentry-python/pull/5579)
- Add `set_attribute` example to changelog by @sentrivana in [#5578](https://github.com/getsentry/sentry-python/pull/5578)

### Internal Changes 🔧

#### Anthropic

- Check system and response ID attributes on spans created by `stream()` by @alexander-alderman-webb in [#5665](https://github.com/getsentry/sentry-python/pull/5665)
- Skip accumulation logic for unexpected types in streamed response by @alexander-alderman-webb in [#5564](https://github.com/getsentry/sentry-python/pull/5564)
- Factor out streamed result handling by @alexander-alderman-webb in [#5563](https://github.com/getsentry/sentry-python/pull/5563)
- Stream valid JSON by @alexander-alderman-webb in [#5641](https://github.com/getsentry/sentry-python/pull/5641)
- Stop mocking response iterator by @alexander-alderman-webb in [#5573](https://github.com/getsentry/sentry-python/pull/5573)

#### Openai Agents

- Do not fail on new tool fields by @alexander-alderman-webb in [#5625](https://github.com/getsentry/sentry-python/pull/5625)
- Stop expecting a specific function name by @alexander-alderman-webb in [#5623](https://github.com/getsentry/sentry-python/pull/5623)
- Set streaming header when library uses `with_streaming_response()` by @alexander-alderman-webb in [#5583](https://github.com/getsentry/sentry-python/pull/5583)
- Replace mocks with `httpx` for streamed responses by @alexander-alderman-webb in [#5580](https://github.com/getsentry/sentry-python/pull/5580)
- Replace mocks with `httpx` in non-MCP tool tests by @alexander-alderman-webb in [#5602](https://github.com/getsentry/sentry-python/pull/5602)
- Replace mocks with `httpx` in MCP tool tests by @alexander-alderman-webb in [#5605](https://github.com/getsentry/sentry-python/pull/5605)
- Replace mocks with `httpx` in handoff tests by @alexander-alderman-webb in [#5604](https://github.com/getsentry/sentry-python/pull/5604)
- Replace mocks with `httpx` in API error test by @alexander-alderman-webb in [#5601](https://github.com/getsentry/sentry-python/pull/5601)
- Replace mocks with `httpx` in non-error single-response tests by @alexander-alderman-webb in [#5600](https://github.com/getsentry/sentry-python/pull/5600)
- Remove test for unreachable state by @alexander-alderman-webb in [#5584](https://github.com/getsentry/sentry-python/pull/5584)
- Expect `namespace` tool field for new `openai` versions by @alexander-alderman-webb in [#5599](https://github.com/getsentry/sentry-python/pull/5599)

#### Other

- (graphene) Simplify span creation by @sentrivana in [#5648](https://github.com/getsentry/sentry-python/pull/5648)
- (httpx) Resolve type checking failures by @alexander-alderman-webb in [#5626](https://github.com/getsentry/sentry-python/pull/5626)
- (pyramid) Support alpha suffixes in version parsing by @alexander-alderman-webb in [#5618](https://github.com/getsentry/sentry-python/pull/5618)
- (rust) Don't implement separate scope management by @sentrivana in [#5639](https://github.com/getsentry/sentry-python/pull/5639)
- (strawberry) Simplify span creation by @sentrivana in [#5647](https://github.com/getsentry/sentry-python/pull/5647)
- 🤖 Update test matrix with new releases (03/16) by @github-actions in [#5671](https://github.com/getsentry/sentry-python/pull/5671)
- Remove custom warden action by @sentrivana in [#5653](https://github.com/getsentry/sentry-python/pull/5653)
- Add `httpx` to linting requirements by @alexander-alderman-webb in [#5644](https://github.com/getsentry/sentry-python/pull/5644)
- Remove CodeQL action by @sentrivana in [#5616](https://github.com/getsentry/sentry-python/pull/5616)
- Normalize dots in package names in `populate_tox.py` by @alexander-alderman-webb in [#5574](https://github.com/getsentry/sentry-python/pull/5574)
- Do not run actions on `potel-base` by @sentrivana in [#5614](https://github.com/getsentry/sentry-python/pull/5614)
</Release>

<Release version="2.52.0a8" date="March 3, 2026" published="2026-03-03T13:14:26.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.52.0a8">
This is an alpha release for internal testing.
</Release>

<Release version="2.54.0" date="March 2, 2026" published="2026-03-02T15:12:59.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.54.0">
### New Features ✨

- Add `set_attribute`, `remove_attribute` to global API by @sentrivana in [#5555](https://github.com/getsentry/sentry-python/pull/5555)

  You can now set and unset attributes on logs and metrics via top-level API. Think of it as `sentry_sdk.set_tag()` for attribute-based telemetry. Other event types (transactions, spans, errors) will be unaffected.

  ```python
  import sentry_sdk
  
  sentry_sdk.init(...)
  
  sentry_sdk.set_attribute("my.attribute", "my value")
  
  # This metric will have "my.attribute" set
  sentry_sdk.metrics.count("counter", 1)
  
  # Remove the attribute
  sentry_sdk.remove_attribute("my.attribute")
  
  # This log will not have "my.attribute" set
  sentry_sdk.logger.info("An info log")
  ```

### Bug Fixes 🐛

#### Openai

- Attach response model with streamed Completions API by @alexander-alderman-webb in [#5557](https://github.com/getsentry/sentry-python/pull/5557)
- Attach response model with streamed Responses API by @alexander-alderman-webb in [#5554](https://github.com/getsentry/sentry-python/pull/5554)
- Avoid consuming iterables passed to the Completions API by @alexander-alderman-webb in [#5489](https://github.com/getsentry/sentry-python/pull/5489)
- Avoid consuming iterables passed to the Embeddings API by @alexander-alderman-webb in [#5491](https://github.com/getsentry/sentry-python/pull/5491)

#### Other

- (anthropic) Fix token accounting by @shellmayr in [#5490](https://github.com/getsentry/sentry-python/pull/5490)
- (google-genai) Remove agent spans for simple requests by @alexander-alderman-webb in [#5443](https://github.com/getsentry/sentry-python/pull/5443)
- (grpc) Read method from handler_call_details for grpcio >= 1.76 compat by @yeung108 in [#5521](https://github.com/getsentry/sentry-python/pull/5521)
- (httpx) Correctly append baggage in async client by @sentrivana in [#5530](https://github.com/getsentry/sentry-python/pull/5530)
- (pydantic-ai) Adapt to missing `ToolManager._call_tool` by @sentrivana in [#5522](https://github.com/getsentry/sentry-python/pull/5522)
- (utils) Use HEROKU_BUILD_COMMIT env var for default release by @ericapisani in [#5499](https://github.com/getsentry/sentry-python/pull/5499)
- (wsgi) Do not wrap file responses when uWSGI offload-threads is enabled by @ericapisani in [#5556](https://github.com/getsentry/sentry-python/pull/5556)

### Documentation 📚

- Add troubleshooting note for editable installs with uWSGI by @ericapisani in [#5552](https://github.com/getsentry/sentry-python/pull/5552)
- Add debugging advice by @alexander-alderman-webb in [#5517](https://github.com/getsentry/sentry-python/pull/5517)
- New integration guide by @alexander-alderman-webb in [#5476](https://github.com/getsentry/sentry-python/pull/5476)

### Internal Changes 🔧

#### Agents

- Add security-review skill to agent configuration by @ericapisani in [#5498](https://github.com/getsentry/sentry-python/pull/5498)
- Add sentry skills to be used by warden in CI reviews by @ericapisani in [#5485](https://github.com/getsentry/sentry-python/pull/5485)

#### Openai

- Only handle streamed results when applicable by @alexander-alderman-webb in [#5553](https://github.com/getsentry/sentry-python/pull/5553)
- Extract input in API-specific functions by @alexander-alderman-webb in [#5546](https://github.com/getsentry/sentry-python/pull/5546)
- Separate output handling by @alexander-alderman-webb in [#5543](https://github.com/getsentry/sentry-python/pull/5543)

#### Openai Agents

- Remove `set_data_normalized` for primitive attributes by @alexander-alderman-webb in [#5509](https://github.com/getsentry/sentry-python/pull/5509)
- Expect new tool fields by @alexander-alderman-webb in [#5471](https://github.com/getsentry/sentry-python/pull/5471)

#### Other

- (ai) Add configuration for dotagents by @ericapisani in [#5480](https://github.com/getsentry/sentry-python/pull/5480)
- (anthropic) Remove `set_data_normalized` for primitive attributes by @alexander-alderman-webb in [#5504](https://github.com/getsentry/sentry-python/pull/5504)
- (github) Add warden configuration by @ericapisani in [#5484](https://github.com/getsentry/sentry-python/pull/5484)
- (pydantic-ai) Remove `set_data_normalized` for the `gen_ai.response.model` attribute by @alexander-alderman-webb in [#5512](https://github.com/getsentry/sentry-python/pull/5512)
- (repo) Add .serena to .gitignore by @ericapisani in [#5464](https://github.com/getsentry/sentry-python/pull/5464)
- Updated codecov.yml by @MathurAditya724 in [#5571](https://github.com/getsentry/sentry-python/pull/5571)
- 🤖 Update test matrix with new releases (02/24) by @github-actions in [#5524](https://github.com/getsentry/sentry-python/pull/5524)
- 🤖 Update test matrix with new releases (02/23) by @github-actions in [#5503](https://github.com/getsentry/sentry-python/pull/5503)
- 🤖 Update test matrix with new releases (02/19) by @github-actions in [#5483](https://github.com/getsentry/sentry-python/pull/5483)
- 🤖 Update test matrix with new releases (02/18) by @github-actions in [#5475](https://github.com/getsentry/sentry-python/pull/5475)
</Release>

<Release version="2.52.0a7" date="February 25, 2026" published="2026-02-25T13:03:08.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.52.0a7">
This is an alpha release for internal testing.
</Release>

<Release version="2.52.0a6" date="February 23, 2026" published="2026-02-23T10:03:24.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.52.0a6">
This is an alpha release for internal testing.
</Release>

<Release version="2.53.0" date="February 16, 2026" published="2026-02-16T11:11:31.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.53.0">
### Bug Fixes 🐛

#### Openai Agents

- Patch `execute_final_output()` functions following library refactor by @alexander-alderman-webb in [#5453](https://github.com/getsentry/sentry-python/pull/5453)
- Patch `execute_handoffs()` functions following library refactor by @alexander-alderman-webb in [#5452](https://github.com/getsentry/sentry-python/pull/5452)
- Patch `run_single_turn_streamed()` functions following library refactor by @alexander-alderman-webb in [#5451](https://github.com/getsentry/sentry-python/pull/5451)
- Patch `run_single_turn()` functions following library refactor by @alexander-alderman-webb in [#5450](https://github.com/getsentry/sentry-python/pull/5450)
- Patch models functions following library refactor by @alexander-alderman-webb in [#5449](https://github.com/getsentry/sentry-python/pull/5449)
- Patch tool functions following library refactor by @alexander-alderman-webb in [#5445](https://github.com/getsentry/sentry-python/pull/5445)

#### Other

- Close the connection we're reading driver_type from by @sentrivana in [#5427](https://github.com/getsentry/sentry-python/pull/5427)

### Documentation 📚

- Document `openai-agents` control-flow by @alexander-alderman-webb in [#5447](https://github.com/getsentry/sentry-python/pull/5447)

### Internal Changes 🔧

#### Openai Agents

- New tool field and library error log by @alexander-alderman-webb in [#5454](https://github.com/getsentry/sentry-python/pull/5454)
- Avoid calling SDK-internal functions by @alexander-alderman-webb in [#5437](https://github.com/getsentry/sentry-python/pull/5437)

#### Other

- Improve Craft config with title stripping and artifact filtering by @BYK in [#5444](https://github.com/getsentry/sentry-python/pull/5444)
- Use fixed clickhouse action, remove aws-sam-cli dependency by @sentrivana in [#5457](https://github.com/getsentry/sentry-python/pull/5457)
- Remove references to unsupported attribute types by @alexander-alderman-webb in [#5425](https://github.com/getsentry/sentry-python/pull/5425)
- Pin setuptools for linting and chalice tests by @alexander-alderman-webb in [#5438](https://github.com/getsentry/sentry-python/pull/5438)
</Release>

<Release version="2.52.0a5" date="February 12, 2026" published="2026-02-12T09:58:03.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.52.0a5">
### Documentation 📚

- Document `openai-agents` control-flow by @alexander-alderman-webb in [#5447](https://github.com/getsentry/sentry-python/pull/5447)

### Internal Changes 🔧

- (ci) Improve Craft config with title stripping and artifact filtering by @BYK in [#5444](https://github.com/getsentry/sentry-python/pull/5444)
- (openai-agents) Avoid calling SDK-internal functions by @alexander-alderman-webb in [#5437](https://github.com/getsentry/sentry-python/pull/5437)
- Remove references to unsupported attribute types by @alexander-alderman-webb in [#5425](https://github.com/getsentry/sentry-python/pull/5425)

### Other

- [do not merge] feat: Span streaming & new span API by @sentrivana in [#5317](https://github.com/getsentry/sentry-python/pull/5317)
</Release>

<Release version="2.52.0a4" date="February 10, 2026" published="2026-02-10T11:22:53.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.52.0a4">
- [do not merge] feat: Span streaming & new span API by @sentrivana in [#5317](https://github.com/getsentry/sentry-python/pull/5317)
</Release>

<Release version="2.52.0a3" date="February 9, 2026" published="2026-02-09T14:54:52.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.52.0a3">
### New Features ✨

- feat(integration): add `gen_ai.conversation.id` if available by @constantinius in [#5307](https://github.com/getsentry/sentry-python/pull/5307)

### Bug Fixes 🐛

#### Mcp

- fix(mcp): Nest MCP spans under HTTP transactions by @alexander-alderman-webb in [#5292](https://github.com/getsentry/sentry-python/pull/5292)
- fix(mcp): Handle all awaitable return types by @alexander-alderman-webb in [#5415](https://github.com/getsentry/sentry-python/pull/5415)

#### Span Streaming

- fix(span-streaming): Always preserialize attributes by @sentrivana in [#5407](https://github.com/getsentry/sentry-python/pull/5407)
- fix(span-streaming): Warn about thread usage if any batcher is active by @sentrivana in [#5408](https://github.com/getsentry/sentry-python/pull/5408)

#### Other

- fix(anthropic): Token reporting by @alexander-alderman-webb in [#5403](https://github.com/getsentry/sentry-python/pull/5403)
- fix(celery): Close the connection we're reading driver_type from by @sentrivana in [#5427](https://github.com/getsentry/sentry-python/pull/5427)
- fix(google-genai): Token reporting by @alexander-alderman-webb in [#5404](https://github.com/getsentry/sentry-python/pull/5404)
- fix(openai): Token reporting by @alexander-alderman-webb in [#5406](https://github.com/getsentry/sentry-python/pull/5406)
- fix(openai-agents): Inject propagation headers for `HostedMCPTool` when streaming by @alexander-alderman-webb in [#5405](https://github.com/getsentry/sentry-python/pull/5405)
- fix: Fix list attribute type by @sentrivana in [#5417](https://github.com/getsentry/sentry-python/pull/5417)
- fix: Adapt to new packaging in toxgen by @sentrivana in [#5382](https://github.com/getsentry/sentry-python/pull/5382)

### Internal Changes 🔧

#### Fastmcp

- test(fastmcp): Wrap prompt in `Message` by @alexander-alderman-webb in [#5411](https://github.com/getsentry/sentry-python/pull/5411)
- test(fastmcp): Remove `test_fastmcp_without_request_context()` by @alexander-alderman-webb in [#5412](https://github.com/getsentry/sentry-python/pull/5412)
- test(fastmcp): Use `AsyncClient` for SSE by @alexander-alderman-webb in [#5400](https://github.com/getsentry/sentry-python/pull/5400)
- test(fastmcp): Use `TestClient` for Streamable HTTP by @alexander-alderman-webb in [#5384](https://github.com/getsentry/sentry-python/pull/5384)
- test(fastmcp): Simulate stdio transport with memory streams by @alexander-alderman-webb in [#5333](https://github.com/getsentry/sentry-python/pull/5333)

#### Mcp

- test(mcp): Use `AsyncClient` for SSE by @alexander-alderman-webb in [#5396](https://github.com/getsentry/sentry-python/pull/5396)
- test(mcp): Use `TestClient` for Streamable HTTP by @alexander-alderman-webb in [#5383](https://github.com/getsentry/sentry-python/pull/5383)
- test(mcp): Remove unused stdio helpers by @alexander-alderman-webb in [#5409](https://github.com/getsentry/sentry-python/pull/5409)

#### Other

- ci: Pin setuptools for linting and chalice tests by @alexander-alderman-webb in [#5438](https://github.com/getsentry/sentry-python/pull/5438)
- ci: Fix lint step by @sentrivana in [#5418](https://github.com/getsentry/sentry-python/pull/5418)
- ci: 🤖 Update test matrix with new releases (02/02) by @github-actions in [#5413](https://github.com/getsentry/sentry-python/pull/5413)
- ci: Update tox and pin packaging version for tox by @alexander-alderman-webb in [#5381](https://github.com/getsentry/sentry-python/pull/5381)

### Other

- [do not merge] feat: Span streaming & new span API by @sentrivana in [#5317](https://github.com/getsentry/sentry-python/pull/5317)
- Update CHANGELOG.md by @alexander-alderman-webb in [bcec5780](https://github.com/getsentry/sentry-python/commit/bcec57806fcb8ef0aa228052aeddf10272df43ba)
- release: 2.52.0 by @alexander-alderman-webb in [3d2154ce](https://github.com/getsentry/sentry-python/commit/3d2154ce57447e6717f7e38b2ea0d1d27b4ff940)
- Revert "feat(ai): Add original input length meta attribute (#5375)" by @alexander-alderman-webb in [#5419](https://github.com/getsentry/sentry-python/pull/5419)
</Release>

<Release version="2.52.0" date="February 4, 2026" published="2026-02-04T15:04:14.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.52.0">
### New Features ✨

#### Other

- feat(integration): add `gen_ai.conversation.id` if available by @constantinius in [#5307](https://github.com/getsentry/sentry-python/pull/5307)

### Bug Fixes 🐛

#### Google Genai

- fix(google-genai): Token reporting by @alexander-alderman-webb in [#5404](https://github.com/getsentry/sentry-python/pull/5404)
- fix(google-genai): deactivate google genai when langchain is used by @shellmayr in [#5389](https://github.com/getsentry/sentry-python/pull/5389)

#### Mcp

- fix(mcp): Nest MCP spans under HTTP transactions by @alexander-alderman-webb in [#5292](https://github.com/getsentry/sentry-python/pull/5292)
- fix(mcp): Handle all awaitable return types by @alexander-alderman-webb in [#5415](https://github.com/getsentry/sentry-python/pull/5415)

#### Other

- fix(anthropic): Token reporting by @alexander-alderman-webb in [#5403](https://github.com/getsentry/sentry-python/pull/5403)
- fix(arq): handle settings_cls passed as keyword argument by @nc9 in [#5393](https://github.com/getsentry/sentry-python/pull/5393)
- fix(dramatiq): cleanup isolated scope and transaction when message is skipped by @frankie567 in [#5346](https://github.com/getsentry/sentry-python/pull/5346)
- fix(openai): Token reporting by @alexander-alderman-webb in [#5406](https://github.com/getsentry/sentry-python/pull/5406)
- fix(openai-agents): Inject propagation headers for `HostedMCPTool` when streaming by @alexander-alderman-webb in [#5405](https://github.com/getsentry/sentry-python/pull/5405)
- fix: Fix list attribute type by @sentrivana in [#5417](https://github.com/getsentry/sentry-python/pull/5417)
- fix: Adapt to new packaging in toxgen by @sentrivana in [#5382](https://github.com/getsentry/sentry-python/pull/5382)

### Internal Changes 🔧

#### Fastmcp

- test(fastmcp): Wrap prompt in `Message` by @alexander-alderman-webb in [#5411](https://github.com/getsentry/sentry-python/pull/5411)
- test(fastmcp): Remove `test_fastmcp_without_request_context()` by @alexander-alderman-webb in [#5412](https://github.com/getsentry/sentry-python/pull/5412)
- test(fastmcp): Use `AsyncClient` for SSE by @alexander-alderman-webb in [#5400](https://github.com/getsentry/sentry-python/pull/5400)
- test(fastmcp): Use `TestClient` for Streamable HTTP by @alexander-alderman-webb in [#5384](https://github.com/getsentry/sentry-python/pull/5384)
- test(fastmcp): Simulate stdio transport with memory streams by @alexander-alderman-webb in [#5333](https://github.com/getsentry/sentry-python/pull/5333)

#### Mcp

- test(mcp): Use `AsyncClient` for SSE by @alexander-alderman-webb in [#5396](https://github.com/getsentry/sentry-python/pull/5396)
- test(mcp): Use `TestClient` for Streamable HTTP by @alexander-alderman-webb in [#5383](https://github.com/getsentry/sentry-python/pull/5383)
- test(mcp): Remove unused stdio helpers by @alexander-alderman-webb in [#5409](https://github.com/getsentry/sentry-python/pull/5409)
- test(mcp): Simulate stdio transport with memory streams by @alexander-alderman-webb in [#5329](https://github.com/getsentry/sentry-python/pull/5329)

#### Other

- ci: Fix lint step by @sentrivana in [#5418](https://github.com/getsentry/sentry-python/pull/5418)
- ci: 🤖 Update test matrix with new releases (02/02) by @github-actions in [#5413](https://github.com/getsentry/sentry-python/pull/5413)
- ci: Update tox and pin packaging version for tox by @alexander-alderman-webb in [#5381](https://github.com/getsentry/sentry-python/pull/5381)
- ci: migration to the new codecov action by @MathurAditya724 in [#5392](https://github.com/getsentry/sentry-python/pull/5392)

### Other

- Revert "feat(ai): Add original input length meta attribute (#5375)" by @alexander-alderman-webb in [#5419](https://github.com/getsentry/sentry-python/pull/5419)
</Release>

<Release version="2.52.0a2" date="February 2, 2026" published="2026-02-02T12:53:07.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.52.0a2">
### New Features ✨

#### Span Streaming

- feat(span-streaming): Add spans to telemetry pipeline, add span name and attributes (3) by @sentrivana in [#5399](https://github.com/getsentry/sentry-python/pull/5399)
- feat(span-streaming): Add span batcher (2) by @sentrivana in [#5398](https://github.com/getsentry/sentry-python/pull/5398)

### Internal Changes 🔧

- test(mcp): Simulate stdio transport with memory streams by @alexander-alderman-webb in [#5329](https://github.com/getsentry/sentry-python/pull/5329)

### Other

- [do not merge] feat: Span streaming & new span API by @sentrivana in [#5317](https://github.com/getsentry/sentry-python/pull/5317)
</Release>

<Release version="2.52.0a1" date="February 2, 2026" published="2026-02-02T08:58:22.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.52.0a1">
### New Features ✨

#### Openai

- feat(openai): Set system instruction attribute for Responses API by @alexander-alderman-webb in [#5376](https://github.com/getsentry/sentry-python/pull/5376)
- feat(openai): Set system instruction attribute for Completions API by @alexander-alderman-webb in [#5358](https://github.com/getsentry/sentry-python/pull/5358)

#### Other

- feat(ai): Add original input length meta attribute by @alexander-alderman-webb in [#5375](https://github.com/getsentry/sentry-python/pull/5375)
- feat(openai-agents): Set system instruction attribute on `gen_ai.chat` spans by @alexander-alderman-webb in [#5370](https://github.com/getsentry/sentry-python/pull/5370)
- feat(span-streaming): Add experimental `trace_lifecycle` switch (1) by @sentrivana in [#5397](https://github.com/getsentry/sentry-python/pull/5397)
- feat(transport): Report 413 responses for oversized envelopes by @alexander-alderman-webb in [#5380](https://github.com/getsentry/sentry-python/pull/5380)

### Bug Fixes 🐛

- fix(ai): Keep single content input message by @alexander-alderman-webb in [#5345](https://github.com/getsentry/sentry-python/pull/5345)
- fix(arq): handle settings_cls passed as keyword argument by @nc9 in [#5393](https://github.com/getsentry/sentry-python/pull/5393)
- fix(dramatiq): cleanup isolated scope and transaction when message is skipped by @frankie567 in [#5346](https://github.com/getsentry/sentry-python/pull/5346)
- fix(google-genai): deactivate google genai when langchain is used by @shellmayr in [#5389](https://github.com/getsentry/sentry-python/pull/5389)

### Internal Changes 🔧

- ci: migration to the new codecov action by @MathurAditya724 in [#5392](https://github.com/getsentry/sentry-python/pull/5392)
- ref: Replace `set_data_normalized()` with `Span.set_data()` for system instructions by @alexander-alderman-webb in [#5374](https://github.com/getsentry/sentry-python/pull/5374)

### Other

- [do not merge] feat: Span streaming & new span API by @sentrivana in [#5317](https://github.com/getsentry/sentry-python/pull/5317)
- Update CHANGELOG.md by @alexander-alderman-webb in [8517eb0a](https://github.com/getsentry/sentry-python/commit/8517eb0a0750796ae73d0e4c020b0a71c7724d0a)
- release: 2.51.0 by @alexander-alderman-webb in [93e89e4c](https://github.com/getsentry/sentry-python/commit/93e89e4c1b7e837c03dd62a81951e56634d4a9c0)
</Release>

<Release version="2.51.0" date="January 28, 2026" published="2026-01-28T10:30:09.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.51.0">
### New Features ✨

#### Openai

- feat(openai): Set system instruction attribute for Responses API by @alexander-alderman-webb in [#5376](https://github.com/getsentry/sentry-python/pull/5376)
- feat(openai): Set system instruction attribute for Completions API by @alexander-alderman-webb in [#5358](https://github.com/getsentry/sentry-python/pull/5358)
- feat(integrations): OpenAI/OpenAI Agents detect and report the time to first token metric (TTFT) as `gen_ai.response.time_to_first_token` by @constantinius in [#5348](https://github.com/getsentry/sentry-python/pull/5348)

#### Openai Agents

- feat(openai-agents): Set system instruction attribute on `gen_ai.chat` spans by @alexander-alderman-webb in [#5370](https://github.com/getsentry/sentry-python/pull/5370)
- feat(openai-agents): Set system instruction attribute by @alexander-alderman-webb in [#5355](https://github.com/getsentry/sentry-python/pull/5355)
- feat(integrations): openai-agents streaming support by @constantinius in [#5291](https://github.com/getsentry/sentry-python/pull/5291)

#### Other

- feat(ai): Add original input length meta attribute by @alexander-alderman-webb in [#5375](https://github.com/getsentry/sentry-python/pull/5375)
- feat(anthropic): Set system instruction attribute by @alexander-alderman-webb in [#5353](https://github.com/getsentry/sentry-python/pull/5353)
- feat(asyncio): Allow to turn task spans off by @sentrivana in [#5367](https://github.com/getsentry/sentry-python/pull/5367)
- feat(gen_ai): add function `set_conversation_id` and managing functions on the Scope and apply it on the Span on `.finish()` by @constantinius in [#5362](https://github.com/getsentry/sentry-python/pull/5362)
- feat(google-genai): Set system instruction attribute by @alexander-alderman-webb in [#5354](https://github.com/getsentry/sentry-python/pull/5354)
- feat(langchain): Set system instruction attribute by @alexander-alderman-webb in [#5357](https://github.com/getsentry/sentry-python/pull/5357)
- feat(pydantic-ai): Set system instruction attribute by @alexander-alderman-webb in [#5356](https://github.com/getsentry/sentry-python/pull/5356)
- feat(transport): Report 413 responses for oversized envelopes by @alexander-alderman-webb in [#5380](https://github.com/getsentry/sentry-python/pull/5380)

### Bug Fixes 🐛

- fix(ai): Keep single content input message by @alexander-alderman-webb in [#5345](https://github.com/getsentry/sentry-python/pull/5345)

### Internal Changes 🔧

- ci(release): Fix changelog-preview permissions by @BYK in [#5368](https://github.com/getsentry/sentry-python/pull/5368)
- ref: Replace `set_data_normalized()` with `Span.set_data()` for system instructions by @alexander-alderman-webb in [#5374](https://github.com/getsentry/sentry-python/pull/5374)
- ci: Fix path in AI integration tests by @alexander-alderman-webb in [#5347](https://github.com/getsentry/sentry-python/pull/5347)
</Release>

<Release version="2.51.0a1" date="January 28, 2026" published="2026-01-28T09:41:10.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.51.0a1">
### New Features ✨

#### Integrations

- feat(integrations): OpenAI/OpenAI Agents detect and report the time to first token metric (TTFT) as `gen_ai.response.time_to_first_token` by @constantinius in [#5348](https://github.com/getsentry/sentry-python/pull/5348)
- feat(integrations): openai-agents streaming support by @constantinius in [#5291](https://github.com/getsentry/sentry-python/pull/5291)

#### Other

- feat(anthropic): Set system instruction attribute by @alexander-alderman-webb in [#5353](https://github.com/getsentry/sentry-python/pull/5353)
- feat(asyncio): Allow to turn task spans off by @sentrivana in [#5367](https://github.com/getsentry/sentry-python/pull/5367)
- feat(gen_ai): add function `set_conversation_id` and managing functions on the Scope and apply it on the Span on `.finish()` by @constantinius in [#5362](https://github.com/getsentry/sentry-python/pull/5362)
- feat(google-genai): Set system instruction attribute by @alexander-alderman-webb in [#5354](https://github.com/getsentry/sentry-python/pull/5354)
- feat(langchain): Set system instruction attribute by @alexander-alderman-webb in [#5357](https://github.com/getsentry/sentry-python/pull/5357)
- feat(openai-agents): Set system instruction attribute by @alexander-alderman-webb in [#5355](https://github.com/getsentry/sentry-python/pull/5355)
- feat(pydantic-ai): Set system instruction attribute by @alexander-alderman-webb in [#5356](https://github.com/getsentry/sentry-python/pull/5356)

### Internal Changes 🔧

- ci(release): Fix changelog-preview permissions by @BYK in [#5368](https://github.com/getsentry/sentry-python/pull/5368)
- ci: Fix path in AI integration tests by @alexander-alderman-webb in [#5347](https://github.com/getsentry/sentry-python/pull/5347)

### Other

- [do not merge] feat: Span streaming & new span API by @sentrivana in [#5317](https://github.com/getsentry/sentry-python/pull/5317)
</Release>

<Release version="2.50.0" date="January 20, 2026" published="2026-01-20T12:53:31.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.50.0">
### New Features ✨

#### Ai

- feat(ai): add cache writes for gen_ai by @shellmayr in [#5319](https://github.com/getsentry/sentry-python/pull/5319)
- feat(ai): add parse_data_uri function to parse a data URI by @constantinius in [#5311](https://github.com/getsentry/sentry-python/pull/5311)

#### Other

- feat(asyncio): Add on-demand way to enable AsyncioIntegration by @sentrivana in [#5288](https://github.com/getsentry/sentry-python/pull/5288)

  You can now enable the `AsyncioIntegration` on demand, after calling `sentry_sdk.init()`. This is useful in scenarios where you don't have
  the event loop running early on, or when you need to instrument multiple event loops.

```python
import sentry_sdk
from sentry_sdk.integrations.asyncio import enable_asyncio_integration

# Initializing the SDK as early as possible, when there is no event loop yet
sentry_sdk.init(
    ...
    # No AsyncioIntegration in explicitly provided `integrations`
)

async def main():
    enable_asyncio_integration()  # instruments the current event loop
    # ...your code...
```

- feat(openai-agents): Inject propagation headers for `HostedMCPTool` by @alexander-alderman-webb in [#5297](https://github.com/getsentry/sentry-python/pull/5297)
- feat(stdlib): Handle proxy tunnels in httlib integration by @sl0thentr0py in [#5303](https://github.com/getsentry/sentry-python/pull/5303)
- feat: Support array types for logs and metrics attributes by @alexander-alderman-webb in [#5314](https://github.com/getsentry/sentry-python/pull/5314)

### Bug Fixes 🐛

#### Integrations

- fix(integrations): google genai report image inputs by @constantinius in [#5337](https://github.com/getsentry/sentry-python/pull/5337)
- fix(integrations): google-genai: reworked `gen_ai.request.messages` extraction from parameters by @constantinius in [#5275](https://github.com/getsentry/sentry-python/pull/5275)
- fix(integrations): pydantic-ai: properly format binary input message parts to be conformant with the `gen_ai.request.messages` structure by @constantinius in [#5251](https://github.com/getsentry/sentry-python/pull/5251)
- fix(integrations): Anthropic: add content transformation for images and documents by @constantinius in [#5276](https://github.com/getsentry/sentry-python/pull/5276)
- fix(integrations): langchain add multimodal content transformation functions for images, audio, and files by @constantinius in [#5278](https://github.com/getsentry/sentry-python/pull/5278)

#### Litellm

- fix(litellm): fix `gen_ai.request.messages` to be as expected by @constantinius in [#5255](https://github.com/getsentry/sentry-python/pull/5255)
- fix(litellm): Guard against module shadowing by @alexander-alderman-webb in [#5249](https://github.com/getsentry/sentry-python/pull/5249)

#### Other

- fix(ai): redact message parts content of type blob by @constantinius in [#5243](https://github.com/getsentry/sentry-python/pull/5243)
- fix(clickhouse): Guard against module shadowing by @alexander-alderman-webb in [#5250](https://github.com/getsentry/sentry-python/pull/5250)
- fix(gql): Revert signature change of patched gql.Client.execute by @alexander-alderman-webb in [#5289](https://github.com/getsentry/sentry-python/pull/5289)
- fix(grpc): Derive interception state from channel fields by @alexander-alderman-webb in [#5302](https://github.com/getsentry/sentry-python/pull/5302)
- fix(pure-eval): Guard against module shadowing by @alexander-alderman-webb in [#5252](https://github.com/getsentry/sentry-python/pull/5252)
- fix(ray): Guard against module shadowing by @alexander-alderman-webb in [#5254](https://github.com/getsentry/sentry-python/pull/5254)
- fix(threading): Handle channels shadowing by @sentrivana in [#5299](https://github.com/getsentry/sentry-python/pull/5299)
- fix(typer): Guard against module shadowing by @alexander-alderman-webb in [#5253](https://github.com/getsentry/sentry-python/pull/5253)
- fix: Stop suppressing exception chains in AI integrations by @alexander-alderman-webb in [#5309](https://github.com/getsentry/sentry-python/pull/5309)
- fix: Send client reports for span recorder overflow by @sentrivana in [#5310](https://github.com/getsentry/sentry-python/pull/5310)

### Documentation 📚

- docs(metrics): Remove experimental notice by @alexander-alderman-webb in [#5304](https://github.com/getsentry/sentry-python/pull/5304)
- docs: Update Python versions banner in README by @sentrivana in [#5287](https://github.com/getsentry/sentry-python/pull/5287)

### Internal Changes 🔧

#### Fastmcp

- test(fastmcp): Narrow `AttributeError` try-except by @alexander-alderman-webb in [#5339](https://github.com/getsentry/sentry-python/pull/5339)
- test(fastmcp): Stop accessing non-existent attribute by @alexander-alderman-webb in [#5338](https://github.com/getsentry/sentry-python/pull/5338)

#### Release

- ci(release): Bump Craft version to fix issues by @BYK in [#5305](https://github.com/getsentry/sentry-python/pull/5305)
- ci(release): Switch from action-prepare-release to Craft by @BYK in [#5290](https://github.com/getsentry/sentry-python/pull/5290)

#### Other

- chore(gen_ai): add auto-enablement for google genai by @shellmayr in [#5295](https://github.com/getsentry/sentry-python/pull/5295)
- chore(repo): Add Claude Code settings with basic permissions by @philipphofmann in [#5342](https://github.com/getsentry/sentry-python/pull/5342)
- ci: 🤖 Update test matrix with new releases (01/19) by @github-actions in [#5330](https://github.com/getsentry/sentry-python/pull/5330)
- ci: Add periodic AI integration tests by @alexander-alderman-webb in [#5313](https://github.com/getsentry/sentry-python/pull/5313)
- chore: Use pull_request_target for changelog preview by @BYK in [#5323](https://github.com/getsentry/sentry-python/pull/5323)
- chore: add unlabeled trigger to changelog-preview by @BYK in [#5315](https://github.com/getsentry/sentry-python/pull/5315)
- chore: Add type for metric units by @sentrivana in [#5312](https://github.com/getsentry/sentry-python/pull/5312)
- ci: Update tox and handle generic classifiers by @sentrivana in [#5306](https://github.com/getsentry/sentry-python/pull/5306)
</Release>

<Release version="2.49.0" date="January 8, 2026" published="2026-01-08T09:56:45.000Z" url="https://github.com/getsentry/sentry-python/releases/tag/2.49.0">
### New Features ✨

- feat(api): Add `Scope.set_attribute` by @sentrivana in [#5256](https://github.com/getsentry/sentry-python/pull/5256)

### Bug Fixes 🐛

- fix(grpc): Gate third-party imports by @alexander-alderman-webb in [#5246](https://github.com/getsentry/sentry-python/pull/5246)
- fix(opentelemetry): Gate third-party imports by @alexander-alderman-webb in [#5247](https://github.com/getsentry/sentry-python/pull/5247)
- fix(ray): Keep variadic kwargs last in signatures by @alexander-alderman-webb in [#5244](https://github.com/getsentry/sentry-python/pull/5244)
- fix(trytond): Gate third-party imports by @alexander-alderman-webb in [#5245](https://github.com/getsentry/sentry-python/pull/5245)
- Fix openai count_tokens by @sl0thentr0py in [#5281](https://github.com/getsentry/sentry-python/pull/5281)

### Documentation 📚

- docs: Fix typo in comment by @sentrivana in [#5280](https://github.com/getsentry/sentry-python/pull/5280)
- docs: Fix `middleware_spans` docstring by @sentrivana in [#5279](https://github.com/getsentry/sentry-python/pull/5279)

### Internal Changes 🔧

- ref(scope): Set global attrs on global scope by @sentrivana in [#5259](https://github.com/getsentry/sentry-python/pull/5259)
- chore: Ignore type migration for scripts/ and tests/ in blame by @alexander-alderman-webb in [#5284](https://github.com/getsentry/sentry-python/pull/5284)
- ref: Properly override parent func by @sentrivana in [#5283](https://github.com/getsentry/sentry-python/pull/5283)
- ci: Allow to use Craft's new auto-versioning by @sentrivana in [#5218](https://github.com/getsentry/sentry-python/pull/5218)
- ref: Deduplicate batchers by @sentrivana in [#5263](https://github.com/getsentry/sentry-python/pull/5263)
- tests: Add dedicated transport format test for metrics, logs by @sentrivana in [#5264](https://github.com/getsentry/sentry-python/pull/5264)
- ci: 🤖 Update test matrix with new releases (01/05) by @github-actions in [#5273](https://github.com/getsentry/sentry-python/pull/5273)
- tests: General logs tests should use Sentry logs API by @sentrivana in [#5262](https://github.com/getsentry/sentry-python/pull/5262)
- tests: Test preserialization of attributes by @sentrivana in [#5260](https://github.com/getsentry/sentry-python/pull/5260)
- ci: Unpin Pydantic 1.x version in tests by @alexander-alderman-webb in [#5261](https://github.com/getsentry/sentry-python/pull/5261)
- ref: Make logs, metrics go via scope by @sentrivana in [#5213](https://github.com/getsentry/sentry-python/pull/5213)
- ci: Fix failing arq, fastapi tests on 3.7; update test matrix by @sentrivana in [#5258](https://github.com/getsentry/sentry-python/pull/5258)
</Release>

<Pagination page="1" total-pages="10" total-items="193" next="https://releases.sh/sentry/sentry-python.md?page=2" />
