Skip to content

Conversation

@uptick-renovate
Copy link
Contributor

@uptick-renovate uptick-renovate bot commented Nov 11, 2025

This PR contains the following updates:

Package Update Change
sentry-sdk (changelog) major ==1.45.1 -> ==2.48.0

Release Notes

getsentry/sentry-python (sentry-sdk)

v2.48.0

Compare Source

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 ✨
Langgraph
OTLP
Bug Fixes 🐛
Integrations
Internal Changes 🔧

v2.47.0

Compare Source

Bug Fixes 🐛
New Features ✨
Deprecations
Build / dependencies / internal 🔧

v2.46.0

Compare Source

Various fixes & improvements

v2.45.0

Compare Source

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 (#&#8203;5089) by @&#8203;constantinius
- feat(loguru): Capture extra (#&#8203;5096) by @&#8203;sentrivana
- feat: Attach `server.address` to metrics (#&#8203;5113) by @&#8203;alexander-alderman-webb
- fix: Cast message and detail attributes before appending exception notes (#&#8203;5114) by @&#8203;alexander-alderman-webb
- fix(integrations): ensure that GEN_AI_AGENT_NAME is properly set for GEN_AI spans under an invoke_agent span (#&#8203;5030) by @&#8203;constantinius
- fix(logs): Update `sentry.origin` (#&#8203;5112) by @&#8203;sentrivana
- chore: Deprecate description truncation option for Redis spans (#&#8203;5073) by @&#8203;alexander-alderman-webb
- chore: Deprecate `max_spans` LangChain parameter (#&#8203;5074) by @&#8203;alexander-alderman-webb
- chore(toxgen): Check availability of pip and add detail to exceptions (#&#8203;5076) by @&#8203;alexander-alderman-webb
- chore: add MCP SDK Pydantic AI and OpenAI Agents to the list of auto enabled integrations (#&#8203;5111) by @&#8203;constantinius
- test: add tests for either FastMCP implementation (#&#8203;5075) by @&#8203;constantinius
- fix(ci): Re-enable skipped tests (#&#8203;5104) by @&#8203;sentrivana
- ci: 🤖 Update test matrix with new releases (11/17) (#&#8203;5110) by @&#8203;github-actions
- ci: Force coverage core ctrace for 3.14 (#&#8203;5108) by @&#8203;sl0thentr0py

v2.44.0

Compare Source

Various fixes & improvements

v2.43.0

Compare Source

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 (#&#8203;4964) by @&#8203;constantinius

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

```python
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 (#&#8203;5038) by @&#8203;constantinius
- fix(integrations): hooking into error tracing function to find out if an execute tool span should be set to error (#&#8203;4986) by @&#8203;constantinius
- fix(django): Improve logic for classifying cache hits and misses (#&#8203;5029) by @&#8203;alexander-alderman-webb
- chore(metrics): Rename \_metrics to metrics (#&#8203;5035) by @&#8203;alexander-alderman-webb
- fix(tracemetrics): Bump metric buffer size to 1k (#&#8203;5031) by @&#8203;k-fish
- fix startlette deprecation warning (#&#8203;5034) by @&#8203;DeoLeung
- build(deps): bump actions/upload-artifact from 4 to 5 (#&#8203;5032) by @&#8203;dependabot
- fix(ai): truncate messages for google genai (#&#8203;4992) by @&#8203;shellmayr
- fix(ai): add message truncation to litellm (#&#8203;4973) by @&#8203;shellmayr
- feat(langchain): Support v1 (#&#8203;4874) by @&#8203;sentrivana
- ci: Run `common` test suite on Python 3.14t (#&#8203;4969) by @&#8203;alexander-alderman-webb
- feat: Officially support 3.14 & run integration tests on 3.14 (#&#8203;4974) by @&#8203;sentrivana
- Make logger template format safer to missing kwargs (#&#8203;4981) by @&#8203;sl0thentr0py
- tests(huggingface): Support 1.0.0rc7 (#&#8203;4979) by @&#8203;alexander-alderman-webb
- feat: Enable HTTP request code origin by default (#&#8203;4967) by @&#8203;alexander-alderman-webb
- ci: Run `common` test suite on Python 3.14 (#&#8203;4896) by @&#8203;sentrivana

v2.42.1

Compare Source

Various fixes & improvements

v2.42.0

Compare Source

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(),
  ],

)

v2.41.0

Compare Source

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

v2.40.0

Compare Source

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 (#&#8203;4883) by @&#8203;alexander-alderman-webb
- Add tracing to `DramatiqIntegration` (#&#8203;4571) by @&#8203;Igreh
- Also emit spans for MCP tool calls done by the LLM (#&#8203;4875) by @&#8203;constantinius
- Option to not trace HTTP requests based on status codes (#&#8203;4869) by @&#8203;alexander-alderman-webb
You can now disable transactions for incoming requests with specific HTTP status codes. The [new `trace_ignore_status_codes` option](https://docs.sentry.io/platforms/python/configuration/options/#trace_ignore_status_codes) 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.

```python
import sentry_sdk

sentry_sdk.init(
    trace_ignore_status_codes={301, 302, 303, *range(305, 400), 404},
)

v2.39.0

Compare Source

Various fixes & improvements

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

v2.38.0

Compare Source

Various fixes & improvements

v2.37.1

Compare Source

Various fixes & improvements

v2.37.0

Compare Source

v2.36.0

Compare Source

Various fixes & improvements
import sentry_sdk
from sentry_sdk.integrations.unraisablehook import UnraisablehookIntegration

sentry_sdk.init(
    dsn="...",
    integrations=[
        UnraisablehookIntegration(),
    ]
)

v2.35.2

Compare Source

Various fixes & improvements

v2.35.1

Compare Source

Various fixes & improvements

v2.35.0

Compare Source

Various fixes & improvements

v2.34.1

Compare Source

Various fixes & improvements

v2.34.0

Compare Source

Various fixes & improvements
  • Considerably raise DEFAULT_MAX_VALUE_LENGTH (#​4632) by @​sentrivana

    We have increased the string trimming limit considerably, allowing you to see more data
    without it being truncated. Note that this might, in rare cases, result in issue regrouping,
    for example if you're capturing message events with very long messages (longer than the
    default 1024 characters/bytes).

    If you want to adjust the limit, you can set a
    max_value_length
    in your sentry_sdk.init().

  • OpenAI integration update (#​4612) by @​antonpirker

    The OpenAIIntegration now supports OpenAI Responses API.

    The data captured will also show up in the new AI Agents Dashboard.

    This works out of the box, nothing to do on your side.

  • Expose set_transaction_name (#​4634) by @​sl0thentr0py

  • Fix(Celery): Latency should be in milliseconds, not seconds (#​4637) by @​sentrivana

  • Fix(Django): Treat django.template.context.BasicContext as sequence in serializer (#​4621) by @​sl0thentr0py

  • Fix(Huggin


Configuration

📅 Schedule: 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.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

@uptick-renovate uptick-renovate bot force-pushed the renovate/sentry-sdk-2.x branch from 1b56b37 to a7409dd Compare November 11, 2025 10:10
@uptick-renovate uptick-renovate bot force-pushed the renovate/sentry-sdk-2.x branch 2 times, most recently from 7f719da to d158af3 Compare November 24, 2025 10:10
@uptick-renovate uptick-renovate bot force-pushed the renovate/sentry-sdk-2.x branch from d158af3 to 1893d5d Compare December 3, 2025 15:13
@uptick-renovate uptick-renovate bot force-pushed the renovate/sentry-sdk-2.x branch from 1893d5d to 600da51 Compare December 16, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant