rollbar / pyrollbar

Error tracking and logging from Python to Rollbar
https://docs.rollbar.com/docs/python/
MIT License
213 stars 135 forks source link

Add trace_chain to shortener_keys defaults #414

Closed bisognano closed 4 months ago

bisognano commented 2 years ago

Hi! I was running into an issue wherein I was sending my locals to rollbar but getting the error

Failsafe from pyrollbar: payload too large. Original payload may be found in your server logs by searching for the UUID.

The solution was to add a new shortener_key to the config as

[("body", "trace_chain", "*", "frames", "*", "locals", "*")]

Looking at the defaults for shortener_keys for when locals.enabled is true, I would have anticipated trace_chain locals handling here as well.

[ ('body', 'trace', 'frames', '*', 'code'), ('body', 'trace', 'frames', '*', 'args', '*'), ('body', 'trace', 'frames', '*', 'kwargs', '*'), ('body', 'trace', 'frames', '*', 'locals', '*') ]

Would it be reasonable to add that trace_chain tuple to the defaults on shortener_chain as well? Looks like theres a stagnant open PR for this currently - https://github.com/rollbar/pyrollbar/pull/365

danielmorell commented 2 years ago

Hi @bisognano, sorry for the delay on this. I think this sounds like a reasonable default. I will take a look at #365.

danielmorell commented 4 months ago

This was resolved when #365 was merged.