From d7e1e8032fc1d3d7747eac1f52d13e92b12f94b1 Mon Sep 17 00:00:00 2001 From: lebaudantoine Date: Mon, 16 Dec 2024 22:35:48 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7(backend)=20fix=20sentry=20deprecat?= =?UTF-8?q?ed=20scope?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `sentry_sdk.configure_scope` is deprecated and will be removed in the next major version. (commit taken from people by @qbey) --- src/backend/impress/settings.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/backend/impress/settings.py b/src/backend/impress/settings.py index 41557bc28..77b68f7fb 100755 --- a/src/backend/impress/settings.py +++ b/src/backend/impress/settings.py @@ -622,8 +622,9 @@ class Base(Configuration): release=get_release(), integrations=[DjangoIntegration()], ) - with sentry_sdk.configure_scope() as scope: - scope.set_extra("application", "backend") + # Add the application name to the Sentry scope + scope = sentry_sdk.get_global_scope() + scope.set_tag("application", "backend") class Build(Base):