🔧(sentry) add Celery beat task integration

This should provide "cron" monitoring in Sentry.
This commit is contained in:
Quentin BEY
2025-04-28 15:49:07 +02:00
parent b389927653
commit 0a241f0e03
2 changed files with 9 additions and 1 deletions

View File

@@ -8,6 +8,10 @@ and this project adheres to
## [Unreleased]
### Added
- 🔧(sentry) add Celery beat task integration #892
### Changed
- 🛂(dimail) simplify interop with dimail

View File

@@ -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,
)