Some stack traces are truncated

I have sentry-sdk==0.8.0 installed on a Flask app posting to an onprem 9.1.2 server.

sentry_sdk.init(
    dsn=app.config['SENTRY_DSN'],
    integrations=[FlaskIntegration(), CeleryIntegration()],
    release=app.config['VERSION'].replace('/', '_'),
    environment=environment.name,
    send_default_pii=True,
)

Some errors are truncated which both limits the stack trace and prevents Sentry from rendering a pretty stack trace. My google-fu is failing me, I cannot find any docs about the PII rule !limit. I added send_default_pii=True to try and mitigate this but it doesn’t seem to work.

How do I get sentry SDK to send full stack traces?

image

A better way to deal with this particular case is to find the code that emits this error and see if you can find a way to avoid stringifying the stacktrace before logging.

For example, log.error("Exception caught: " + traceback.format_exc(...)) causes less data to be sent than log.error("Exception caught", exc_info=True)

This makes perfect sense. Thank you!