Skip to content

[celery] Don't mark expected failures as errors#820

Merged
brettlangdon merged 4 commits into
DataDog:0.22-devfrom
fellowapp:celery-expected-failures
Feb 22, 2019
Merged

[celery] Don't mark expected failures as errors#820
brettlangdon merged 4 commits into
DataDog:0.22-devfrom
fellowapp:celery-expected-failures

Conversation

@sciyoshi

Copy link
Copy Markdown
Contributor

Celery supports a Task.throws option for expected task failures. This PR adds a check to skip reporting error tags if a task throws one of those exceptions. @Kyle-Verhoog

@sciyoshi
sciyoshi force-pushed the celery-expected-failures branch from 50555b4 to cdbe2c6 Compare February 11, 2019 21:46
@Kyle-Verhoog
Kyle-Verhoog changed the base branch from master to 0.22-dev February 15, 2019 20:08
@Kyle-Verhoog
Kyle-Verhoog requested a review from a team as a code owner February 15, 2019 20:08

@Kyle-Verhoog Kyle-Verhoog left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks for the contribution (and tests!!) @sciyoshi 😄

ok_('Traceback (most recent call last)' in span.get_tag('error.stack'))
ok_('Task class is failing' in span.get_tag('error.stack'))

def test_class_task_exception_expected(self):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

ok_('Traceback (most recent call last)' in span.get_tag('error.stack'))
ok_('Task class is failing' in span.get_tag('error.stack'))

def test_fn_exception_expected(self):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment thread ddtrace/contrib/celery/signals.py
@brettlangdon brettlangdon changed the title Don't mark expected failures in Celery tasks as errors [celery] Don't mark expected failures as errors Feb 21, 2019
@brettlangdon
brettlangdon merged commit 2952888 into DataDog:0.22-dev Feb 22, 2019
@brettlangdon brettlangdon mentioned this pull request Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants