Skip to content

chore(api): update dependency sentry-sdk to v1.19.1 (develop)

RenovateBot requested to merge renovate/develop-api-sentry-sdk-1.x into develop

This MR contains the following updates:

Package Type Update Change
sentry-sdk (changelog) dependencies minor ==1.12.1 -> ==1.19.1

Release Notes



Compare Source

Various fixes & improvements


Compare Source

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.


    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(...),
    def init_sentry(**kwargs):
            integrations=[CeleryIntegration(monitor_beat_tasks=True)],  # 👈 here

    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(

    On the client:

    import grpc
    from sentry_sdk.integrations.grpc.client import ClientInterceptor
    with grpc.insecure_channel("") 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.


    import sentry_sdk
    from sentry_sdk.integrations.socket import SocketIntegration
  • Fix: Do not trim span descriptions. (#​1983) by @​antonpirker


Compare Source

Various fixes & improvements
  • New: Implement EventScrubber (#​1943) by @​sl0thentr0py

    To learn more see our Scrubbing Sensitive Data documentation.

    Add a new EventScrubber class that scrubs certain potentially sensitive interfaces with a DEFAULT_DENYLIST. The default scrubber is automatically run if send_default_pii = False:

    import sentry_sdk
    from sentry_sdk.scrubber import EventScrubber


  event_scrubber=EventScrubber(),  # this is set by default


You can also pass in a custom `denylist` to the `EventScrubber` class and filter additional fields that you want.

from sentry_sdk.scrubber import EventScrubber, DEFAULT_DENYLIST


Compare Source

Various fixes & improvements
  • New: Monitor Celery Beat tasks with Sentry Cron Monitoring.

    With this feature you can make sure that your Celery beat tasks run at the right time and see if they where successful or not.

    Warning Cron Monitoring is currently in beta. Beta features are still in-progress and may have bugs. We recognize the irony. If you have any questions or feedback, please email us at, reach out via Discord (#cronjobs), or open an issue.



Compare Source

Various fixes & improvements
  • New: Add arq Integration (#​1872) by @​Zhenay

    This integration will create performance spans when arq jobs will be enqueued and when they will be run. It will also capture errors in jobs and will link them to the performance spans.


    import asyncio
    from httpx import AsyncClient
    from arq import create_pool
    from arq.connections import RedisSettings
    import sentry_sdk
    from sentry_sdk.integrations.arq import ArqIntegration
    from sentry_sdk.tracing import TRANSACTION_SOURCE_COMPONENT
    async def download_content(ctx, url):
        session: AsyncClient = ctx['session']
        response = await session.get(url)
        print(f'{url}: {response.text:.80}...')
        return len(response.text)
    async def startup(ctx):
        ctx['session'] = AsyncClient()
    async def shutdown(ctx):
        await ctx['session'].aclose()
    async def main():
        with sentry_sdk.start_transaction(name="testing_arq_tasks", source=TRANSACTION_SOURCE_COMPONENT):
            redis = await create_pool(RedisSettings())
            for url in ('', '', '', "asdf"
                await redis.enqueue_job('download_content', url)
    class WorkerSettings:
        functions = [download_content]
        on_startup = startup
        on_shutdown = shutdown
    if __name__ == '__main__':
  • Update of Falcon Integration (#​1733) by @​bartolootrit

  • Adding Cloud Resource Context integration (#​1882) by @​antonpirker

  • Profiling: Use the transaction timestamps to anchor the profile (#​1898) by @​Zylphrex

  • Profiling: Add debug logs to profiling (#​1883) by @​Zylphrex

  • Profiling: Start profiler thread lazily (#​1903) by @​Zylphrex

  • Fixed checks for structured http data (#​1905) by @​antonpirker

  • Make set_measurement public api and remove experimental status (#​1909) by @​sl0thentr0py

  • Add trace_propagation_targets option (#​1916) by @​antonpirker

  • Add enable_tracing to default traces_sample_rate to 1.0 (#​1900) by @​sl0thentr0py

  • Remove deprecated tracestate (#​1907) by @​sl0thentr0py

  • Sanitize URLs in Span description and breadcrumbs (#​1876) by @​antonpirker

  • Mechanism should default to true unless set explicitly (#​1889) by @​sl0thentr0py

  • Better setting of in-app in stack frames (#​1894) by @​antonpirker

  • Add workflow to test gevent (#​1870) by @​Zylphrex

  • Updated outdated HTTPX test matrix (#​1917) by @​antonpirker

  • Switch to MIT license (#​1908) by @​cleptric


Compare Source

Various fixes & improvements
  • New: Add Huey Integration (#​1555) by @​Zhenay

    This integration will create performance spans when Huey tasks will be enqueued and when they will be executed.


    Task definition in

    import time
    from huey import SqliteHuey, crontab
    import sentry_sdk
    from sentry_sdk.integrations.huey import HueyIntegration
    huey = SqliteHuey(filename='/tmp/demo.db')
    def add_numbers(a, b):
        return a + b

    Running the tasks in

    from demo import add_numbers, flaky_task, nightly_backup
    import sentry_sdk
    from sentry_sdk.integrations.huey import HueyIntegration
    from sentry_sdk.tracing import TRANSACTION_SOURCE_COMPONENT, Transaction
    def main():
        with sentry_sdk.start_transaction(name="testing_huey_tasks", source=TRANSACTION_SOURCE_COMPONENT):
            r = add_numbers(1, 2)
    if __name__ == "__main__":
  • Profiling: Do not send single sample profiles (#​1879) by @​Zylphrex

  • Profiling: Add additional test coverage for profiler (#​1877) by @​Zylphrex

  • Profiling: Always use builtin time.sleep (#​1869) by @​Zylphrex

  • Profiling: Defaul in_app decision to None (#​1855) by @​Zylphrex

  • Profiling: Remove use of threading.Event (#​1864) by @​Zylphrex

  • Profiling: Enable profiling on all transactions (#​1797) by @​Zylphrex

  • FastAPI: Fix check for Starlette in FastAPI integration (#​1868) by @​antonpirker

  • Flask: Do not overwrite default for username with email address in FlaskIntegration (#​1873) by @​homeworkprod

  • Tests: Add py3.11 to test-common (#​1871) by @​Zylphrex

  • Fix: Don't log whole event in before_send / event_processor drops (#​1863) by @​sl0thentr0py


Compare Source

Various fixes & improvements
  • Add before_send_transaction (#​1840) by @​antonpirker

    Adds a hook (similar to before_send) that is called for all transaction events (performance releated data).


      import sentry_sdk
      def strip_sensitive_data(event, hint):

modify event here (or return None if you want to drop the event entirely)

    return event




See also:

- Django: Always remove values of Django session related cookies. (#​1842) by @​antonpirker
- Profiling: Enable profiling for ASGI frameworks (#​1824) by @​Zylphrex
- Profiling: Better gevent support (#​1822) by @​Zylphrex
- Profiling: Add profile context to transaction (#​1860) by @​Zylphrex
- Profiling: Use co_qualname in python 3.11 (#​1831) by @​Zylphrex
- OpenTelemetry: fix Use dict for sentry-trace context instead of tuple (#​1847) by @​AbhiPrasad
- OpenTelemetry: fix extra dependency (#​1825) by @​bernardotorres
- OpenTelemetry: fix NoOpSpan updates scope (#​1834) by @​Zylphrex
- OpenTelemetry: Make sure to noop when there is no DSN (#​1852) by @​antonpirker
- FastAPI: Fix middleware being patched multiple times (#​1841) by @​JohnnyDeuss
- Starlette: Avoid import of pkg_resource with Starlette integration (#​1836) by @​mgu
- Removed code coverage target (#​1862) by @​antonpirker


Compare Source

Various fixes & improvements


📅 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 MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this MR and you won't be reminded about this update again.

  • If you want to rebase/retry this MR, check this box

This MR has been generated by Renovate Bot.

Edited by RenovateBot

Merge request reports