How to disable PII rule limit in Sentry?

Some of the sentry messages are getting trimmed because of PII rule. How to disable it to view complete message?

Instead of disabling the limit, could you tell us the name of the logger that created this message?

@unitaker

We have a custom stack trace logger which is replacing newlines with spaces as we need this for ELK stack.

_logger.error('EXCEPTION: {0}'.format(
    traceback.format_exc().replace('\n', ' ')))

So we are planning to disable the limit so that everything gets logged.

Try this:

_logger.exception("EXCEPTION")

this should give you better stacktraces overall.

If you need to put the entire log statement on one line I think you want to use python-json-logger or some other handler/formatter, not serialize while calling your logger

This just once instance where we are having a problem. There are some other 3rd party modules which are logging lengthy messages. We don’t have control on these loggers but we don’t want to disable them.

How do we handle such scenarios?

@ChillarAnand if you want to filter out those messages you could use before_send to filter by exception message. I would do this because ultimately those stringified stacktraces will group so poorly that most of Sentry’s value is lost.

If you really just want to raise the limit you can use the workaround described here to raise it in the SDK, and patch this line to raise the limit on the server. Ideally this really shouldn’t be necessary though, and the latter only works for your own deployments of Sentry.