Skip to content

Commit

Permalink
Prevent stack trace truncation
Browse files Browse the repository at this point in the history
  • Loading branch information
mejroslav committed Aug 31, 2023
1 parent c3365e8 commit 2d8a37f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions asab/sentry/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ def __init__(self, app, service_name: str = "asab.SentryService"):
sentry_sdk.set_tag("instance_id", self.InstanceId)


# IMPORTANT: This is because the default settings truncates long stack traces
# https://stackoverflow.com/questions/53699110/how-do-i-increase-the-max-length-of-captured-python-parameters-in-sentry
sentry_sdk.utils.MAX_STRING_LENGTH = 8192


def capture_exception(self, error=None, scope=None, **scope_args):
"""
Capture caught exception and send it to Sentry.
Expand Down

0 comments on commit 2d8a37f

Please sign in to comment.