Skip to content

Sentry doesn't capture billiard.exceptions.TimeLimitExceeded from Celery #613

Description

@maxmalysh

Hi,

I've noticed that sentry-sdk doesn't capture billiard.exceptions.TimeLimitExceeded when a task fails.

I've tried Celery 3.1.26 and 4.4. Sentry-sdk is 0.14.1.

Example:

# tasks.py
from time import sleep
from celery import shared_task
@shared_task(time_limit=2)
def test_time_limit():
sleep(5)

Logs:

[2020-01-30 15:07:59,614: ERROR/MainProcess] Task handler raised error: TimeLimitExceeded(2,)
Traceback (most recent call last):
File "/Users/mmalysh/Development/my-website/venv/lib/python3.6/site-packages/billiard/pool.py", line 684, in on_hard_timeout
raise TimeLimitExceeded(job._timeout)
billiard.exceptions.TimeLimitExceeded: TimeLimitExceeded(2,)
[2020-01-30 15:07:59,627: ERROR/MainProcess] Hard time limit (2s) exceeded for api.tasks.test_foobar[e4f46f20-2311-4417-9ade-53e735430c65]

We didn't have this problem with raven. All other exceptions are reported properly. For example, this exception is reported as expected:

@shared_task
def test_bazqux():
raise Exception('BUY BITCOIN!')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions