diff --git a/authentik/lib/sentry.py b/authentik/lib/sentry.py index 6bcd8ad49..e7772df19 100644 --- a/authentik/lib/sentry.py +++ b/authentik/lib/sentry.py @@ -19,9 +19,12 @@ from rest_framework.exceptions import APIException from sentry_sdk import HttpTransport from sentry_sdk import init as sentry_sdk_init from sentry_sdk.api import set_tag +from sentry_sdk.integrations.argv import ArgvIntegration from sentry_sdk.integrations.celery import CeleryIntegration from sentry_sdk.integrations.django import DjangoIntegration from sentry_sdk.integrations.redis import RedisIntegration +from sentry_sdk.integrations.socket import SocketIntegration +from sentry_sdk.integrations.stdlib import StdlibIntegration from sentry_sdk.integrations.threading import ThreadingIntegration from structlog.stdlib import get_logger from websockets.exceptions import WebSocketException @@ -61,10 +64,13 @@ def sentry_init(**sentry_init_kwargs): sentry_sdk_init( dsn=CONFIG.y("error_reporting.sentry_dsn"), integrations=[ + ArgvIntegration(), + StdlibIntegration(), DjangoIntegration(transaction_style="function_name"), - CeleryIntegration(), + CeleryIntegration(monitor_beat_tasks=True), RedisIntegration(), ThreadingIntegration(propagate_hub=True), + SocketIntegration(), ], before_send=before_send, traces_sampler=traces_sampler, diff --git a/poetry.lock b/poetry.lock index f7f979abc..27ced9589 100644 --- a/poetry.lock +++ b/poetry.lock @@ -3017,14 +3017,14 @@ urllib3 = {version = ">=1.26,<2.0", extras = ["socks"]} [[package]] name = "sentry-sdk" -version = "1.18.0" +version = "1.19.0" description = "Python client for Sentry (https://sentry.io)" category = "main" optional = false python-versions = "*" files = [ - {file = "sentry-sdk-1.18.0.tar.gz", hash = "sha256:d07b9569a151033b462f7a7113ada94cc41ecf49daa83d35f5f852a0b9cf3b44"}, - {file = "sentry_sdk-1.18.0-py2.py3-none-any.whl", hash = "sha256:714203a9adcac4a4a35e348dc9d3e294ad0200a66cdca26c068967d728f34fcb"}, + {file = "sentry-sdk-1.19.0.tar.gz", hash = "sha256:6732b59a55051646587acce21f6a00b53d05df9282d54886ad88b59b4e9b82ad"}, + {file = "sentry_sdk-1.19.0-py2.py3-none-any.whl", hash = "sha256:8dcffbbb963963567384d6eb49c76b8fb05753540715cbee5e5ca5bc8327ded4"}, ] [package.dependencies] @@ -3042,6 +3042,7 @@ django = ["django (>=1.8)"] falcon = ["falcon (>=1.4)"] fastapi = ["fastapi (>=0.79.0)"] flask = ["blinker (>=1.1)", "flask (>=0.11)"] +grpcio = ["grpcio (>=1.21.1)"] httpx = ["httpx (>=0.16.0)"] huey = ["huey (>=2)"] opentelemetry = ["opentelemetry-distro (>=0.35b0)"]