github getsentry/sentry-python 2.42.0

one day ago

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

Don't miss a new sentry-python release

NewReleases is sending notifications on new releases.