Skip to content

Commit

Permalink
exceptions.AnsibleFailedError: Add fingerprint()
Browse files Browse the repository at this point in the history
This will cause Sentry to group events by their failure reasons, rather
than lumping all AnsibleFailedErrors together

Signed-off-by: Zack Cerza <[email protected]>
  • Loading branch information
zmc committed Jul 24, 2023
1 parent 1426592 commit baaa9f2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions teuthology/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ def __str__(self):
failures=self.failures,
)

def fingerprint(self):
"""
Sentry will use this to group events by their failure reasons, rather
than lumping all AnsibleFailedErrors together
"""
return self.failures


class CommandCrashedError(Exception):

Expand Down

0 comments on commit baaa9f2

Please sign in to comment.