🔧(backend) fix sentry deprecated scope

`sentry_sdk.configure_scope` is deprecated and will
be removed in the next major version.
This commit is contained in:
Quentin BEY
2024-10-25 13:35:58 +02:00
committed by BEY Quentin
parent 54e5be81e2
commit 2d46b7d504

View File

@@ -490,8 +490,10 @@ class Base(Configuration):
integrations=[DjangoIntegration()],
traces_sample_rate=0.1,
)
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")
# Ignore the logs added by the DockerflowMiddleware
ignore_logger("request.summary")