How do you use Sentry?
Self-hosted/on-premise
Version
2.55.0
Steps to Reproduce
- Set up a Django app using Celery and sentry-sdk, passing
enable_logs=True to sentry_sdk.init()
- Trigger a celery task
- Observe a log in Sentry for task received (of the format
Task {task_name}[{uuid}] received) but not for task succeeded (of the format Task {task_name}[{uuid}] succeeded in {duration}: {data})
- Observe a log via traditional Python logging mechanism (or Celery stdout/etc) for both task received and task succeeded
I believe this is caused by the ignore_logger invocation in ./sentry_sdk/integrations/celery/__init__.py:CeleryIntegration.setup_once:
class CeleryIntegration(Integration):
...
@staticmethod
def setup_once() -> None:
...
ignore_logger("celery.app.trace")
Expected Result
The following logs in Sentry Logs:
Task {task_name}[{uuid}] received
Task {task_name}[{uuid}] succeeded in {duration}: {data}
Actual Result
The following logs in Sentry Logs:
Task {task_name}[{uuid}] received
How do you use Sentry?
Self-hosted/on-premise
Version
2.55.0
Steps to Reproduce
enable_logs=Truetosentry_sdk.init()Task {task_name}[{uuid}] received) but not for task succeeded (of the formatTask {task_name}[{uuid}] succeeded in {duration}: {data})I believe this is caused by the
ignore_loggerinvocation in./sentry_sdk/integrations/celery/__init__.py:CeleryIntegration.setup_once:Expected Result
The following logs in Sentry Logs:
Actual Result
The following logs in Sentry Logs: