Skip to content

Releases: getsentry/sentry-python

1.24.0

23 May 09:45
39b3770
Compare
Choose a tag to compare

Various fixes & improvements

  • New: Celery Beat exclude tasks option (#2130) by @antonpirker

    You can exclude Celery Beat tasks from being auto-instrumented. To do this, add a list of tasks you want to exclude as option exclude_beat_tasks when creating CeleryIntegration. The list can contain simple strings with the full task name, as specified in the Celery Beat schedule, or regular expressions to match multiple tasks.

    For more information, see the documentation for Crons for more information.

    Usage:

        exclude_beat_tasks = [
            "some-task-a",
            "payment-check-.*",
        ]
        sentry_sdk.init(
            dsn='___PUBLIC_DSN___',
            integrations=[
                CeleryIntegration(
                    monitor_beat_tasks=True,
                    exclude_beat_tasks=exclude_beat_tasks,
                ),
            ],
        )

    In this example the task some-task-a and all tasks with a name starting with payment-check- will be ignored.

  • New: Add support for ExceptionGroups (#2025) by @antonpirker

    Note: If running Self-Hosted Sentry, you should wait to adopt this SDK update until after updating to the 23.6.0 (est. June 2023) release of Sentry. Updating early will not break anything, but you will not get the full benefit of the Exception Groups improvements to issue grouping that were added to the Sentry backend.

  • Prefer importlib.metadata over pkg_resources if available (#2081) by @sentrivana

  • Work with a copy of request, vars in the event (#2125) by @sentrivana

  • Pinned version of dependency that broke the build (#2133) by @antonpirker

1.23.1

17 May 11:29
5722425
Compare
Choose a tag to compare

Various fixes & improvements

1.23.0

15 May 12:42
8480e47
Compare
Choose a tag to compare

Various fixes & improvements

  • New: Add loguru integration (#1994) by @PerchunPak

    Check the documentation for more information.

    Usage:

    from loguru import logger
    import sentry_sdk
    from sentry_sdk.integrations.loguru import LoguruIntegration
    
    sentry_sdk.init(
        dsn="___PUBLIC_DSN___",
        integrations=[
            LoguruIntegration(),
        ],
    )
    
    logger.debug("I am ignored")
    logger.info("I am a breadcrumb")
    logger.error("I am an event", extra=dict(bar=43))
    logger.exception("An exception happened")
    • An error event with the message "I am an event" will be created.
    • "I am a breadcrumb" will be attached as a breadcrumb to that event.
    • bar will end up in the extra attributes of that event.
    • "An exception happened" will send the current exception from sys.exc_info() with the stack trace to Sentry. If there's no exception, the current stack will be attached.
    • The debug message "I am ignored" will not be captured by Sentry. To capture it, set level to DEBUG or lower in LoguruIntegration.
  • Do not truncate request body if request_bodies is "always" (#2092) by @sentrivana

  • Fixed Celery headers for Beat auto-instrumentation (#2102) by @antonpirker

  • Add db.operation to Redis and MongoDB spans (#2089) by @antonpirker

  • Make sure we're importing redis the library (#2106) by @sentrivana

  • Add include_source_context option (#2020) by @farhat-nawaz and @sentrivana

  • Import Markup from markupsafe (#2047) by @rco-ableton

  • Fix __qualname__ missing attribute in asyncio integration (#2105) by @sl0thentr0py

  • Remove relay extension from AWS Layer (#2068) by @sl0thentr0py

  • Add a note about pip freeze to the bug template (#2103) by @sentrivana

1.22.2

08 May 12:23
5dcccb9
Compare
Choose a tag to compare

Various fixes & improvements

1.22.1

05 May 13:55
Compare
Choose a tag to compare

Various fixes & improvements

  • Fix: Handle a list of keys (not just a single key) in Django cache spans (#2082) by @antonpirker

1.22.0

05 May 12:03
917ef8f
Compare
Choose a tag to compare

Various fixes & improvements

  • Add cache.hit and cache.item_size to Django (#2057) by @antonpirker

    Note: This will add spans for all requests to the caches configured in Django. This will probably add some overhead to your server an also add multiple spans to your performance waterfall diagrams. If you do not want this, you can disable this feature in the DjangoIntegration:

    sentry_sdk.init(
        dsn="...",
        integrations=[
            DjangoIntegration(cache_spans=False),
        ]
    )
  • Use http.method instead of method (#2054) by @AbhiPrasad

  • Handle non-int exc.status_code in Starlette (#2075) by @sentrivana

  • Handle SQLAlchemy engine.name being bytes (#2074) by @sentrivana

  • Fix KeyError in capture_checkin if SDK is not initialized (#2073) by @antonpirker

  • Use functools.wrap for ThreadingIntegration patches to fix attributes (#2080) by @EpicWink

  • Pin urllib3 to <2.0.0 for now (#2069) by @sl0thentr0py

1.21.1

28 Apr 19:29
Compare
Choose a tag to compare

Various fixes & improvements

1.21.0

25 Apr 13:50
1aa5788
Compare
Choose a tag to compare

Various fixes & improvements

  • Better handling of redis span/breadcrumb data (#2033) by @antonpirker

    Note: With this release we will limit the description of redis db spans and the data in breadcrumbs represting redis db operations to 1024 characters.

    This can can lead to truncated data. If you do not want this there is a new parameter max_data_size in RedisIntegration. You can set this to None for disabling trimming.

    Example for disabling trimming of redis commands in spans or breadcrumbs:

    sentry_sdk.init(
      integrations=[
        RedisIntegration(max_data_size=None),
      ]
    )

    Example for custom trim size of redis commands in spans or breadcrumbs:

    sentry_sdk.init(
      integrations=[
        RedisIntegration(max_data_size=50),
      ]
    )`
  • Add db.system to redis and SQLAlchemy db spans (#2037, #2038, #2039) (#2037) by @AbhiPrasad

  • Upgraded linting tooling (#2026) by @antonpirker

  • Made code more resilient. (#2031) by @antonpirker

1.20.0

19 Apr 11:14
f3a5b8d
Compare
Choose a tag to compare

Various fixes & improvements

  • Send all events to /envelope endpoint when tracing is enabled (#2009) by @antonpirker

    Note: If you’re self-hosting Sentry 9, you need to stay in the previous version of the SDK or update your self-hosted to at least 20.6.0

  • Profiling: Remove profile context from SDK (#2013) by @Zylphrex

  • Profiling: Additionl performance improvements to the profiler (#1991) by @Zylphrex

  • Fix: Celery Beat monitoring without restarting the Beat process (#2001) by @antonpirker

  • Fix: Using the Codecov uploader instead of deprecated python package (#2011) by @antonpirker

  • Fix: Support for Quart (#2003)` (#2003) by @antonpirker

1.19.1

05 Apr 15:43
eb37f64
Compare
Choose a tag to compare

Various fixes & improvements