rollbar / pyrollbar

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

Fixed shortener multi level shortening #449

Closed danielmorell closed 4 months ago

danielmorell commented 4 months ago

Description of the change

This PR fixes the key matching shortener logic that was preventing deep shortening of the payload.

There are a few significant changes here:

  1. The shortner transform is moved to the beginning of the transforms. There is no point scrubbing data if we are just going to remove it.
  2. A shortener key that ends with a '*' key will not only match everything at that level it will also match all of the children of that key.
  3. The shortener keys are uses to set a "base level" for maxlevel. Each level deep than the shortener key is checked to see if it exceeds the maxlevel. This is only applied if the key matches and ends with a final '*' key.

Because this may have a meaningful change in the frame data we are sending, I think this should be a minor change not a patch. I also think we should release this as a beta initially. This would be v1.1.0-beta0.

Type of change

Related issues

Checklists

Development

Code review