Skip to content

Releases: getsentry/sentry-python

1.23.1

17 May 11:29
5722425

Choose a tag to compare

Various fixes & improvements

1.23.0

15 May 12:42
8480e47

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

Choose a tag to compare

Various fixes & improvements

1.22.1

05 May 13:55

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

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

Choose a tag to compare

Various fixes & improvements

1.21.0

25 Apr 13:50
1aa5788

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

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

Choose a tag to compare

Various fixes & improvements

1.19.0

04 Apr 11:48
fe941eb

Choose a tag to compare

Various fixes & improvements

  • New: Celery Beat auto monitoring (#1967) by @antonpirker

    The CeleryIntegration can now also monitor your Celery Beat scheduled tasks automatically using the new Crons feature of Sentry.

    To learn more see our Celery Beat Auto Discovery documentation.

    Usage:

    from celery import Celery, signals
    from celery.schedules import crontab
    
    import sentry_sdk
    from sentry_sdk.integrations.celery import CeleryIntegration
    
    
    app = Celery('tasks', broker='...')
    app.conf.beat_schedule = {
        'set-in-beat-schedule': {
            'task': 'tasks.some_important_task',
            'schedule': crontab(...),
        },
    }
    
    
    @signals.celeryd_init.connect
    def init_sentry(**kwargs):
        sentry_sdk.init(
            dsn='...',
            integrations=[CeleryIntegration(monitor_beat_tasks=True)],  # πŸ‘ˆ here
            environment="local.dev.grace",
            release="v1.0",
        )

    This will auto detect all schedules tasks in your beat_schedule and will monitor them with Sentry Crons.

  • New: gRPC integration (#1911) by @hossein-raeisi

    The gRPC integration instruments all incoming requests and outgoing unary-unary, unary-stream grpc requests using grpcio channels.

    To learn more see our gRPC Integration documentation.

    On the server:

    import grpc
    from sentry_sdk.integrations.grpc.server import ServerInterceptor
    
    
    server = grpc.server(
        thread_pool=...,
        interceptors=[ServerInterceptor()],
    )

    On the client:

    import grpc
    from sentry_sdk.integrations.grpc.client import ClientInterceptor
    
    
    with grpc.insecure_channel("example.com:12345") as channel:
        channel = grpc.intercept_channel(channel, *[ClientInterceptor()])
  • New: socket integration (#1911) by @hossein-raeisi

    Use this integration to create spans for DNS resolves (socket.getaddrinfo()) and connection creations (socket.create_connection()).

    To learn more see our Socket Integration documentation.

    Usage:

    import sentry_sdk
    from sentry_sdk.integrations.socket import SocketIntegration
    sentry_sdk.init(
        dsn="___PUBLIC_DSN___",
        integrations=[
            SocketIntegration(),
        ],
    )
  • Fix: Do not trim span descriptions. (#1983) by @antonpirker