From 0a241f0e0311b613c15000dbd1fd8e5cb1646eed Mon Sep 17 00:00:00 2001 From: Quentin BEY Date: Mon, 28 Apr 2025 15:49:07 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7(sentry)=20add=20Celery=20beat=20ta?= =?UTF-8?q?sk=20integration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This should provide "cron" monitoring in Sentry. --- CHANGELOG.md | 4 ++++ src/backend/people/settings.py | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9151ac0..75c44b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ and this project adheres to ## [Unreleased] +### Added + +- 🔧(sentry) add Celery beat task integration #892 + ### Changed - 🛂(dimail) simplify interop with dimail diff --git a/src/backend/people/settings.py b/src/backend/people/settings.py index 47a78a3..3144633 100755 --- a/src/backend/people/settings.py +++ b/src/backend/people/settings.py @@ -21,6 +21,7 @@ import sentry_sdk from configurations import Configuration, values from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import rsa +from sentry_sdk.integrations.celery import CeleryIntegration from sentry_sdk.integrations.django import DjangoIntegration from sentry_sdk.integrations.logging import ignore_logger @@ -749,7 +750,10 @@ class Base(Configuration): dsn=cls.SENTRY_DSN, environment=cls.__name__.lower(), release=get_release(), - integrations=[DjangoIntegration()], + integrations=[ + DjangoIntegration(), + CeleryIntegration(monitor_beat_tasks=True), + ], traces_sample_rate=0.1, )