Skip to content

Releases: getsentry/sentry-python

3.0.0a7

20 Oct 13:50
7d96f39

Choose a tag to compare

3.0.0a7 Pre-release
Pre-release

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.

2.42.1

20 Oct 12:38

Choose a tag to compare

Various fixes & improvements

2.42.0

15 Oct 07:41

Choose a tag to compare

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

2.41.0

09 Oct 14:12
685287d

Choose a tag to compare

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

2.40.0

06 Oct 12:27
04968c4

Choose a tag to compare

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

2.39.0

25 Sep 09:15
0f99a91

Choose a tag to compare

Various fixes & improvements

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

2.38.0

15 Sep 15:00
d94652a

Choose a tag to compare

Various fixes & improvements

2.37.1

09 Sep 13:48
cd23041

Choose a tag to compare

Various fixes & improvements

2.37.0

05 Sep 11:41
75ef769

Choose a tag to compare

2.36.0

04 Sep 07:56

Choose a tag to compare

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