Skip to content

Update dependency sentry-sdk to v2.54.0#245

Open
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/sentry-sdk-2.x
Open

Update dependency sentry-sdk to v2.54.0#245
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/sentry-sdk-2.x

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 2, 2026

This PR contains the following updates:

Package Change Age Confidence
sentry-sdk (changelog) ==2.44.0==2.54.0 age confidence

Release Notes

getsentry/sentry-python (sentry-sdk)

v2.54.0

Compare Source

New Features ✨
  • Add set_attribute, remove_attribute to global API by @​sentrivana in #​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.

    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
Other
Documentation 📚
Internal Changes 🔧
Agents
Openai
Openai Agents
Other

v2.53.0

Compare Source

Bug Fixes 🐛
Openai Agents
Other
Documentation 📚
Internal Changes 🔧
Openai Agents
Other

v2.52.0

Compare Source

New Features ✨
Other
Bug Fixes 🐛
Google Genai
Mcp
Other
Internal Changes 🔧
Fastmcp
Mcp
Other
Other

v2.51.0

Compare Source

New Features ✨
Openai
Openai Agents
Other
Bug Fixes 🐛
Internal Changes 🔧

v2.50.0

Compare Source

New Features ✨
Ai
Other
  • feat(asyncio): Add on-demand way to enable AsyncioIntegration by @​sentrivana in #​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.

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...
Bug Fixes 🐛
Integrations
  • fix(integrations): google genai report image inputs by @​constantinius in #​5337
  • fix(integrations): google-genai: reworked gen_ai.request.messages extraction from parameters by @​constantinius in #​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
  • fix(integrations): Anthropic: add content transformation for images and documents by @​constantinius in #​5276
  • fix(integrations): langchain add multimodal content transformation functions for images, audio, and files by @​constantinius in #​5278
Litellm
Other
Documentation 📚
Internal Changes 🔧
Fastmcp
Release
  • ci(release): Bump Craft version to fix issues by @​BYK in #​5305
  • ci(release): Switch from action-prepare-release to Craft by @​BYK in #​5290
Other

v2.49.0

Compare Source

New Features ✨
Bug Fixes 🐛
Documentation 📚
Internal Changes 🔧

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 (#​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


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 was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/sentry-sdk-2.x branch from a249bc3 to fe6dc54 Compare March 13, 2026 11:22
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.

0 participants