releases.shpreview
Sentry/Sentry Python

Sentry Python

$npx -y @buildinternet/releases show sentry-python
Mon
Wed
Fri
AprMayJunJulAugSepOctNovDecJanFebMarApr
Less
More
Releases18Avg6/moVersionsv2.50.0 → v2.57.0
Dec 16, 2025

Middleware spans are now disabled by default in Django, Starlette and FastAPI integrations. Set the middleware_spans integration-level option to capture individual spans per middleware layer. To record Django middleware spans, for example, configure as follows

  import sentry_sdk
  from sentry_sdk.integrations.django import DjangoIntegration

  sentry_sdk.init(
      dsn="<your-dsn>",
      integrations=[
          DjangoIntegration(middleware_spans=True),
      ],
  )

New Features ✨

  • feat(ai): add single message truncation by @shellmayr in #5079

  • feat(django): Add span around Task.enqueue by @sentrivana in #5209

  • feat(starlette): Set transaction name when middleware spans are disabled by @alexander-alderman-webb in #5223

  • feat: Add "K_REVISION" to environment variable release check (exposed by cloud run) by @rpradal in #5222

Langgraph

  • feat(langgraph): Response model attribute on invocation spans by @alexander-alderman-webb in #5212
  • feat(langgraph): Usage attributes on invocation spans by @alexander-alderman-webb in #5211

OTLP

  • feat(otlp): Optionally capture exceptions from otel's Span.record_exception api by @sl0thentr0py in #5235
  • feat(otlp): Implement new Propagator.inject for OTLPIntegration by @sl0thentr0py in #5221

Bug Fixes 🐛

Integrations

  • fix(django): Set active thread ID when middleware spans are disabled by @alexander-alderman-webb in #5220

  • fix(integrations): openai-agents fixing the input messages structure which was wrapped too much in some cases by @constantinius in #5203

  • fix(integrations): openai-agents fix multi-patching of get_model function by @constantinius in #5195

  • fix(integrations): add values for pydantic-ai and openai-agents to _INTEGRATION_DEACTIVATES to prohibit double span creation by @constantinius in #5196

  • fix(logs): Set span_id instead of sentry.trace.parent_span_id attribute by @sentrivana in #5241

  • fix(logs, metrics): Gate metrics, logs user attributes behind send_default_pii by @sentrivana in #5240

  • fix(pydantic-ai): Stop capturing internal exceptions by @alexander-alderman-webb in #5237

  • fix(ray): Actor class decorator with arguments by @alexander-alderman-webb in #5230

  • fix: Don't log internal exception for tornado user auth by @sl0thentr0py in #5208

  • fix: Fix changelog config by @sentrivana in #5192

Internal Changes 🔧

  • chore(django): Disable middleware spans by default by @alexander-alderman-webb in #5219

  • chore(starlette): Disable middleware spans by default by @alexander-alderman-webb in #5224

  • ci: Unpin Python version for LiteLLM tests by @alexander-alderman-webb in #5238

  • ci: 🤖 Update test matrix with new releases (12/15) by @github-actions in #5229

  • chore: Ignore type annotation migration in blame by @alexander-alderman-webb in #5234

  • ref: Clean up get_active_propagation_context by @sl0thentr0py in #5217

  • ref: Cleanup outgoing propagation_context logic by @sl0thentr0py in #5215

  • ci: Pin Python version to at least 3.10 for LiteLLM by @alexander-alderman-webb in #5202

  • test: Remove skipped test by @sentrivana in #5197

  • Convert all remaining type annotations into the modern format by @zsol in #5239

  • Convert sentry_sdk type annotations into the modern format by @zsol in #5206

Dec 3, 2025

Bug Fixes 🐛

  • fix: Make PropagationContext.from_incoming_data always return a PropagationContext by @sl0thentr0py in #5186
  • fix(integrations): anthropic set GEN_AI_OPERATION_NAME by @constantinius in #5185
  • fix(spotlight): align behavior with SDK spec by @BYK in #5169
  • fix(integrations): do not exit early when config is not passed as it is not required and prohibits setting gen_ai.request.messages by @constantinius in #5167
  • fix(langchain): add gen_ai.response.model to chat spans by @shellmayr in #5159
  • fix(integrations): add the system prompt to the gen_ai.request.messages attribute by @constantinius in #5161
  • fix(ai): Handle Pydantic model classes in _normalize_data by @skalinchuk in #5143
  • fix(openai-agents): Avoid double span exit on exception by @alexander-alderman-webb in #5174
  • fix(openai-agents): Store invoke_agent span on agents.RunContextWrapper by @alexander-alderman-webb in #5165
  • Add back span status by @sl0thentr0py in #5147

New Features ✨

  • feat(integrations): openai-agents: add usage and response model reporting for chat and invoke_agent spans by @constantinius in #5157
  • feat: Implement strict_trace_continuation by @sl0thentr0py in #5178
  • feat(integration): pydantic-ai: properly report token usage and response model for invoke_agent spans by @constantinius in #5153
  • feat(integrations): add support for embed_content methods in GoogleGenAI integration by @constantinius in #5128
  • feat(logs): Record discarded log bytes by @alexander-alderman-webb in #5144
  • feat: Add an initial changelog config by @sentrivana in #5145
  • feat(django): Instrument database rollbacks by @alexander-alderman-webb in #5115
  • feat(django): Instrument database commits by @alexander-alderman-webb in #5100
  • feat(openai-agents): Truncate long messages by @alexander-alderman-webb in #5141
  • Add org_id support by @sl0thentr0py in #5166

Deprecations

  • Deprecate continue_from_headers by @sl0thentr0py in #5160

Build / dependencies / internal 🔧

  • Remove unsupported SPANSTATUS.(ERROR|UNSET) by @sl0thentr0py in #5146
  • Rename setup_otlp_exporter to setup_otlp_traces_exporter by @sl0thentr0py in #5142
  • Simplify continue_trace to reuse propagation_context values by @sl0thentr0py in #5158
  • Make PropagationContext hold baggage instead of dynamic_sampling_context by @sl0thentr0py in #5156
  • Cleanup PropagationContext.from_incoming_data by @sl0thentr0py in #5155
  • chore: Add commit_patterns to changelog config, remove auto-labeler by @sentrivana in #5176
  • build(deps): bump actions/github-script from 7 to 8 by @dependabot in #5171
  • build(deps): bump supercharge/redis-github-action from 1.8.1 to 2 by @dependabot in #5172
  • ci: 🤖 Update test matrix with new releases (12/01) by @github-actions in #5173
  • ci: Add auto-label GH action by @sentrivana in #5163
  • ci: Split up Test AI workflow by @alexander-alderman-webb in #5148
  • ci: Update test matrix with new releases (11/24) by @alexander-alderman-webb in #5139
  • test: Import integrations with empty shadow modules by @alexander-alderman-webb in #5150
  • Add deprecations to changelog categories by @sentrivana in #5162
Nov 24, 2025

Various fixes & improvements

  • Preserve metadata on wrapped coroutines (#5105) by @alexander-alderman-webb
  • Make imports defensive to avoid ModuleNotFoundError in Pydantic AI integration (#5135) by @alexander-alderman-webb
  • Fix OpenAI agents integration mistakenly enabling itself (#5132) by @sentrivana
  • Add instrumentation to embedding functions for various backends (#5120) by @constantinius
  • Improve embeddings support for OpenAI (#5121) by @constantinius
  • Enhance input handling for embeddings in LiteLLM integration (#5127) by @constantinius
  • Expect exceptions when re-raised (#5125) by @alexander-alderman-webb
  • Remove MagicMock from mocked ModelResponse (#5126) by @alexander-alderman-webb
Nov 18, 2025

Various fixes & improvements

  • OTLPIntegration (#4877) by @sl0thentr0py

    Enable the new OTLP integration with the code snippet below, and your OpenTelemetry instrumentation will be automatically sent to Sentry's OTLP ingestion endpoint.

      import sentry_sdk
      from sentry_sdk.integrations.otlp import OTLPIntegration
    
      sentry_sdk.init(
          dsn="<your-dsn>",
          # Add data like inputs and responses;
          # see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
          send_default_pii=True,
          integrations=[
              OTLPIntegration(),
          ],
      )
    

    Under the hood, this will setup:

    • A SpanExporter that will automatically set up the OTLP ingestion endpoint from your DSN
    • A Propagator that ensures Distributed Tracing works
    • Trace/Span linking for all other Sentry events such as Errors, Logs, Crons and Metrics

    If you were using the SentrySpanProcessor before, we recommend migrating over to OTLPIntegration since it's a much simpler setup.

  • feat(integrations): implement context management for invoke_agent spans (#5089) by @constantinius

  • feat(loguru): Capture extra (#5096) by @sentrivana

  • feat: Attach server.address to metrics (#5113) by @alexander-alderman-webb

  • fix: Cast message and detail attributes before appending exception notes (#5114) by @alexander-alderman-webb

  • fix(integrations): ensure that GEN_AI_AGENT_NAME is properly set for GEN_AI spans under an invoke_agent span (#5030) by @constantinius

  • fix(logs): Update sentry.origin (#5112) by @sentrivana

  • chore: Deprecate description truncation option for Redis spans (#5073) by @alexander-alderman-webb

  • chore: Deprecate max_spans LangChain parameter (#5074) by @alexander-alderman-webb

  • chore(toxgen): Check availability of pip and add detail to exceptions (#5076) by @alexander-alderman-webb

  • chore: add MCP SDK Pydantic AI and OpenAI Agents to the list of auto enabled integrations (#5111) by @constantinius

  • test: add tests for either FastMCP implementation (#5075) by @constantinius

  • fix(ci): Re-enable skipped tests (#5104) by @sentrivana

  • ci: 🤖 Update test matrix with new releases (11/17) (#5110) by @github-actions

  • ci: Force coverage core ctrace for 3.14 (#5108) by @sl0thentr0py

Nov 11, 2025

Various fixes & improvements

  • fix(openai): Check response text is present to avoid AttributeError (#5081) by @alexander-alderman-webb
  • fix(pydantic-ai): Do not fail on new ToolManager._call_tool() parameters (#5084) by @alexander-alderman-webb
  • tests(huggingface): Avoid None version (#5083) by @alexander-alderman-webb
  • ci: Pin coverage version for 3.14 Django tests (#5088) by @alexander-alderman-webb
  • chore: X handle update (#5078) by @cleptric
  • fix(openai-agents): add input messages to errored spans as well (#5077) by @shellmayr
  • fix: Add hard limit to log batcher (#5069) by @alexander-alderman-webb
  • fix: Add hard limit to metrics batcher (#5068) by @alexander-alderman-webb
  • fix(integrations): properly handle exceptions in tool calls (#5065) by @constantinius
  • feat: non-experimental before_send_metric option (#5064) by @alexander-alderman-webb
  • feat: non-experimental enable_metrics option (#5056) by @alexander-alderman-webb
  • fix(integrations): properly distinguish between network.transport and mcp.transport (#5063) by @constantinius
  • feat(integrations): add ability to auto-deactivate lower-level integrations based on map (#5052) by @shellmayr
  • Fix NOT_GIVEN check in anthropic (#5058) by @sl0thentr0py
  • ci: 🤖 Update test matrix with new releases (11/03) (#5054) by @github-actions
  • Add external_propagation_context support (#5051) by @sl0thentr0py
  • chore: Remove enable_metrics option (#5046) by @alexander-alderman-webb
  • Allow new integration setup on the instance with config options (#5047) by @sl0thentr0py
  • ci: Run integration tests on Python 3.14t (#4995) by @alexander-alderman-webb
  • docs: Elaborate on Strawberry autodetection in changelog (#5039) by @sentrivana
Oct 29, 2025

Various fixes & improvements

  • Pydantic AI integration (#4906) by @constantinius

    Enable the new Pydantic AI integration with the code snippet below, and you can use the Sentry AI dashboards to observe your AI calls:

    import sentry_sdk
    from sentry_sdk.integrations.pydantic_ai import PydanticAIIntegration
    sentry_sdk.init(
        dsn="<your-dsn>",
        # Set traces_sample_rate to 1.0 to capture 100%
        # of transactions for tracing.
        traces_sample_rate=1.0,
        # Add data like inputs and responses;
        # see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
        send_default_pii=True,
        integrations=[
            PydanticAIIntegration(),
        ],
    )
    
  • MCP Python SDK (#4964) by @constantinius

    Enable the new Python MCP integration with the code snippet below:

    import sentry_sdk
    from sentry_sdk.integrations.mcp import MCPIntegration
    sentry_sdk.init(
        dsn="<your-dsn>",
        # Set traces_sample_rate to 1.0 to capture 100%
        # of transactions for tracing.
        traces_sample_rate=1.0,
        # Add data like inputs and responses;
        # see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
        send_default_pii=True,
        integrations=[
            MCPIntegration(),
        ],
    )
    
  • fix(strawberry): Remove autodetection, always use sync extension (#4984) by @sentrivana

    Previously, StrawberryIntegration would try to guess whether it should install the sync or async version of itself. This auto-detection was very brittle and could lead to us auto-enabling async code in a sync context. With this change, StrawberryIntegration remains an auto-enabling integration, but it'll enable the sync version by default. If you want to enable the async version, pass the option explicitly:

    sentry_sdk.init(
        # ...
        integrations=[
            StrawberryIntegration(
                async_execution=True
            ),
        ],
    )
    
  • fix(google-genai): Set agent name (#5038) by @constantinius

  • fix(integrations): hooking into error tracing function to find out if an execute tool span should be set to error (#4986) by @constantinius

  • fix(django): Improve logic for classifying cache hits and misses (#5029) by @alexander-alderman-webb

  • chore(metrics): Rename _metrics to metrics (#5035) by @alexander-alderman-webb

  • fix(tracemetrics): Bump metric buffer size to 1k (#5031) by @k-fish

  • fix startlette deprecation warning (#5034) by @DeoLeung

  • build(deps): bump actions/upload-artifact from 4 to 5 (#5032) by @dependabot

  • fix(ai): truncate messages for google genai (#4992) by @shellmayr

  • fix(ai): add message truncation to litellm (#4973) by @shellmayr

  • feat(langchain): Support v1 (#4874) by @sentrivana

  • ci: Run common test suite on Python 3.14t (#4969) by @alexander-alderman-webb

  • feat: Officially support 3.14 & run integration tests on 3.14 (#4974) by @sentrivana

  • Make logger template format safer to missing kwargs (#4981) by @sl0thentr0py

  • tests(huggingface): Support 1.0.0rc7 (#4979) by @alexander-alderman-webb

  • feat: Enable HTTP request code origin by default (#4967) by @alexander-alderman-webb

  • ci: Run common test suite on Python 3.14 (#4896) by @sentrivana

Oct 20, 2025

We are discontinuing development on 3.0. Please see https://github.com/getsentry/sentry-python/discussions/4955 for more information.

3.0.0a7 is a maintenance release that adds a warning that there won't be a stable 3.0 release. If you are on a 3.0 alpha release, please switch back to 2.x to get the newest features and fixes.

Various fixes & improvements

  • fix(gcp): Inject scopes in TimeoutThread exception with GCP (#4959) by @alexander-alderman-webb
  • fix(aws): Inject scopes in TimeoutThread exception with AWS lambda (#4914) by @alexander-alderman-webb
  • fix(ai): add message trunction to anthropic (#4953) by @shellmayr
  • fix(ai): add message truncation to langgraph (#4954) by @shellmayr
  • fix: Default breadcrumbs value for events without breadcrumbs (#4952) by @alexander-alderman-webb
  • fix(ai): add message truncation in langchain (#4950) by @shellmayr
  • fix(ai): correct size calculation, rename internal property for message truncation & add test (#4949) by @shellmayr
  • fix(ai): introduce message truncation for openai (#4946) by @shellmayr
  • fix(openai): Use non-deprecated Pydantic method to extract response text (#4942) by @JasonLovesDoggo
  • ci: 🤖 Update test matrix with new releases (10/16) (#4945) by @github-actions
  • Handle ValueError in scope resets (#4928) by @sl0thentr0py
  • fix(litellm): Classify embeddings correctly (#4918) by @alexander-alderman-webb
  • Generalize NOT_GIVEN check with omit for openai (#4926) by @sl0thentr0py
  • ⚡️ Speed up function _get_db_span_description (#4924) by @misrasaurabh1
Oct 15, 2025

Various fixes & improvements

  • feat: Add source information for slow outgoing HTTP requests (#4902) by @alexander-alderman-webb

  • tests: Update tox (#4913) by @sentrivana

  • fix(Ray): Retain the original function name when patching Ray tasks (#4858) by @svartalf

  • feat(ai): Add python-genai integration (#4891) by @vgrozdanic Enable the new Google GenAI integration with the code snippet below, and you can use the Sentry AI dashboards to observe your AI calls:

    import sentry_sdk
    from sentry_sdk.integrations.google_genai import GoogleGenAIIntegration
    sentry_sdk.init(
        dsn="<your-dsn>",
        # Set traces_sample_rate to 1.0 to capture 100%
        # of transactions for tracing.
        traces_sample_rate=1.0,
        # Add data like inputs and responses;
        # see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
        send_default_pii=True,
        integrations=[
            GoogleGenAIIntegration(),
        ],
    )
    
Oct 9, 2025

Various fixes & improvements

  • feat: Add concurrent.futures patch to threading integration (#4770) by @alexander-alderman-webb

    The SDK now makes sure to automatically preserve span relationships when using ThreadPoolExecutor.

  • chore: Remove old metrics code (#4899) by @sentrivana

    Removed all code related to the deprecated experimental metrics feature (sentry_sdk.metrics).

  • ref: Remove "experimental" from log function name (#4901) by @sentrivana

  • fix(ai): Add mapping for gen_ai message roles (#4884) by @shellmayr

  • feat(metrics): Add trace metrics behind an experiments flag (#4898) by @k-fish

Oct 6, 2025

Various fixes & improvements

  • Add LiteLLM integration (#4864) by @constantinius Once you've enabled the new LiteLLM integration, you can use the Sentry AI Agents Monitoring, a Sentry dashboard that helps you understand what's going on with your AI requests:

    import sentry_sdk
    from sentry_sdk.integrations.litellm import LiteLLMIntegration
    sentry_sdk.init(
        dsn="<your-dsn>",
        # Set traces_sample_rate to 1.0 to capture 100%
        # of transactions for tracing.
        traces_sample_rate=1.0,
        # Add data like inputs and responses;
        # see https://docs.sentry.io/platforms/python/data-management/data-collected/ for more info
        send_default_pii=True,
        integrations=[
            LiteLLMIntegration(),
        ],
    )
    
  • Litestar: Copy request info to prevent cookies mutation (#4883) by @alexander-alderman-webb

  • Add tracing to DramatiqIntegration (#4571) by @Igreh

  • Also emit spans for MCP tool calls done by the LLM (#4875) by @constantinius

  • Option to not trace HTTP requests based on status codes (#4869) by @alexander-alderman-webb You can now disable transactions for incoming requests with specific HTTP status codes. The new trace_ignore_status_codes option accepts a set of status codes as integers. If a transaction wraps a request that results in one of the provided status codes, the transaction will be unsampled.

    import sentry_sdk
    
    sentry_sdk.init(
        trace_ignore_status_codes={301, 302, 303, *range(305, 400), 404},
    )
    
  • Move _set_agent_data call to ai_client_span function (#4876) by @constantinius

  • Add script to determine lowest supported versions (#4867) by @sentrivana

  • Update CONTRIBUTING.md (#4870) by @sentrivana

Sep 25, 2025

Various fixes & improvements

  • Fix(AI): Make agents integrations set the span status in case of error (#4820) by @antonpirker
  • Fix(dedupe): Use weakref in dedupe where possible (#4834) by @sl0thentr0py
  • Fix(Django): Avoid evaluating complex Django object in span.data/span.attributes (#4804) by @antonpirker
  • Fix(Langchain): Don't record tool call output if not include_prompt / should_send_default_pii (#4836) by @shellmayr
  • Fix(OpenAI): Don't swallow userland exceptions in openai (#4861) by @sl0thentr0py
  • Docs: Update contributing guidelines with instructions to run tests with tox (#4857) by @alexander-alderman-webb
  • Test(Spark): Improve test_spark speed (#4822) by @mgaligniana

Note: This is my last release. So long, and thanks for all the fish! by @antonpirker

Sep 15, 2025

Various fixes & improvements

  • Feat(huggingface_hub): Update HuggingFace Hub integration (#4746) by @antonpirker
  • Feat(Anthropic): Add proper tool calling data to Anthropic integration (#4769) by @antonpirker
  • Feat(openai-agents): Add input and output to invoke_agent span. (#4785) by @antonpirker
  • Feat(AI): Create transaction in AI agents framworks, when no transaction is running. (#4758) by @constantinius
  • Feat(GraphQL): Support gql 4.0-style execute (#4779) by @sentrivana
  • Fix(logs): Expect log_item as rate limit category (#4798) by @sentrivana
  • Fix: CI for mypy, gevent (#4790) by @sentrivana
  • Fix: Correctly check for a running transaction (#4791) by @antonpirker
  • Fix: Use float for sample rand (#4677) by @sentrivana
  • Fix: Avoid reporting false-positive StopAsyncIteration in the asyncio integration (#4741) by @vmarkovtsev
  • Fix: Add log message when DedupeIntegration is dropping an error. (#4788) by @antonpirker
  • Fix(profiling): Re-init continuous profiler (#4772) by @Zylphrex
  • Chore: Reexport module profiler (#4535) by @zen-xu
  • Tests: Update tox.ini (#4799) by @sentrivana
  • Build(deps): bump actions/create-github-app-token from 2.1.1 to 2.1.4 (#4795) by @dependabot
  • Build(deps): bump actions/setup-python from 5 to 6 (#4774) by @dependabot
  • Build(deps): bump codecov/codecov-action from 5.5.0 to 5.5.1 (#4773) by @dependabot
Sep 9, 2025

Various fixes & improvements

  • Fix(langchain): Make Langchain integration work with just langchain-core (#4783) by @shellmayr
  • Tests: Move quart under toxgen (#4775) by @sentrivana
  • Tests: Update tox.ini (#4777) by @sentrivana
  • Tests: Move chalice under toxgen (#4766) by @sentrivana
Sep 5, 2025
  • New Integration (BETA): Add support for langgraph (#4727) by @shellmayr

    We can now instrument AI agents that are created with LangGraph out of the box.

    For more information see the LangGraph integrations documentation.

  • AI Agents: Improve rendering of input and output messages in AI agents integrations. (#4750) by @shellmayr

  • AI Agents: Format span attributes in AI integrations (#4762) by @antonpirker

  • CI: Fix celery (#4765) by @sentrivana

  • Tests: Move asyncpg under toxgen (#4757) by @sentrivana

  • Tests: Move beam under toxgen (#4759) by @sentrivana

  • Tests: Move boto3 tests under toxgen (#4761) by @sentrivana

  • Tests: Remove openai pin and update tox (#4748) by @sentrivana

Sep 4, 2025

Various fixes & improvements

  • New integration: Unraisable exceptions (#4733) by @alexander-alderman-webb

    Add the unraisable exception integration to your sentry_sdk.init call:

import sentry_sdk
from sentry_sdk.integrations.unraisablehook import UnraisablehookIntegration

sentry_sdk.init(
    dsn="...",
    integrations=[
        UnraisablehookIntegration(),
    ]
)
  • meta: Update instructions on release process (#4755) by @sentrivana
  • tests: Move arq under toxgen (#4739) by @sentrivana
  • tests: Support dashes in test suite names (#4740) by @sentrivana
  • Don't fail if there is no _context_manager_state (#4698) by @sentrivana
  • Wrap span restoration in __exit__ in capture_internal_exceptions (#4719) by @sentrivana
  • fix: Constrain types of ai_track decorator (#4745) by @alexander-alderman-webb
  • Fix openai_agents in CI (#4742) by @sentrivana
  • Remove old langchain test suites from ignore list (#4737) by @sentrivana
  • tests: Trigger Pytest failure when an unraisable exception occurs (#4738) by @alexander-alderman-webb
  • fix(openai): Avoid double exit causing an unraisable exception (#4736) by @alexander-alderman-webb
  • tests: Move langchain under toxgen (#4734) by @sentrivana
  • toxgen: Add variants & move OpenAI under toxgen (#4730) by @sentrivana
  • Update tox.ini (#4731) by @sentrivana
Sep 1, 2025

We're excited to announce that version 3.0 of the Sentry Python SDK is now available. This release is the result of a long-term effort to use OpenTelemetry under the hood for tracing. This switch opens the door for us to leverage the full power of OpenTelemetry, so stay tuned for more integrations and features in future releases.

Looking to upgrade from Sentry SDK 2.x to 3.x? See the full list of changes for a comprehensive overview of what's changed. Looking for a more digestible summary? See the migration guide in the docs with the most common migration patterns.

⚠️ This is a pre-release. If you feel like taking it for a spin, we'd be grateful for your feedback. How was the migration? Is everything working as expected? Is nothing working as expected? Something in between? Please let us know on GitHub or on Discord.

This version also adds an experimental async transport option. It can be enabled by passing transport_async=true in the experiments dict in sentry_sdk.init(). The async transport requires the asyncio integration and the httpcore[asyncio] library.

Various fixes & improvements

  • fix(logs): Do not attach template if there are no parameters (#4728) by @sentrivana
Aug 26, 2025

Various fixes & improvements

  • OpenAI Agents: Isolate agent run (#4720) by @sentrivana
  • Tracing: Do not attach stacktrace to transaction (#4713) by @Zylphrex
Aug 14, 2025

Various fixes & improvements

  • Langchain Integration now supports the Sentry AI dashboard. (#4678) by @shellmayr
  • Anthropic Integration now supports the Sentry AI dashboard. (#4674) by @constantinius
  • AI Agents templates for @trace decorator (#4676) by @antonpirker
  • Sentry Logs: Add enable_logs, before_send_log as top-level sentry_sdk.init() options (#4644) by @sentrivana
  • Tracing: Improve @trace decorator. Allows to set span.op, span.name, and span.attributes (#4648) by @antonpirker
  • Tracing: Add convenience function sentry_sdk.update_current_span. (#4673) by @antonpirker
  • Tracing: Add Span.update_data() to update multiple span.data items at once. (#4666) by @antonpirker
  • GNU-integration: make path optional (#4688) by @MeredithAnya
  • Clickhouse: Don't eat the generator data (#4669) by @szokeasaurusrex
  • Clickhouse: List send_data parameters (#4667) by @szokeasaurusrex
  • Update gen_ai.* and ai.* attributes (#4665) by @antonpirker
  • Better checking for empty tools list (#4647) by @antonpirker
  • Remove performance paper cuts (#4675) by @sentrivana
  • Help for debugging Cron problems (#4686) by @antonpirker
  • Fix Redis CI (#4691) by @sentrivana
  • Fix plugins key codecov (#4655) by @sl0thentr0py
  • Fix Mypy (#4649) by @sentrivana
  • Update tox.ini (#4689) by @sentrivana
  • build(deps): bump actions/create-github-app-token from 2.0.6 to 2.1.0 (#4684) by @dependabot
Latest
2.58.0
Tracking Since
Jul 6, 2021
Last fetched Apr 19, 2026