pythondjangosentry

How do I increase the max length of captured Python parameters in Sentry?


I'm using sentry-python==0.5.3 in a Django 1.11.6 project, and when I inspect a stacktrace's parameter list, I see some of the values are long enough to be cut off by a ... elipsis. I want to see the entire value.

How do I configure sentry-python to show the entire parameter value in the stacktrace?

Here's how I'm calling the init function in my Django config:

sentry_sdk.init(
    dsn="sentry dsn",
    integrations=[DjangoIntegration()],
    send_default_pii=True
)

Solution

  • I just found this in the sentry-sdk Python source code, which makes me think it's not yet possible to configure this in the new SDK.

    # TODO: read max_length from config
    

    https://github.com/getsentry/sentry-python/blob/9f15a4027615d40cfdb37375233bc903d3cc753e/sentry_sdk/utils.py#L626