diff --git a/rollbar/lib/transforms/shortener.py b/rollbar/lib/transforms/shortener.py index ae8d810b..89ae5a58 100644 --- a/rollbar/lib/transforms/shortener.py +++ b/rollbar/lib/transforms/shortener.py @@ -78,8 +78,6 @@ def _shorten_other(self, obj): return self._repr.repr(obj) def traverse_dict(self, d): - max_size = self._get_max_size(d) - d = self._shorten_mapping(d, max_size) for k, v in d.items(): if isinstance(v, dict): max_size = self._get_max_size(v) @@ -93,6 +91,8 @@ def _shorten(self, val): max_size = self._get_max_size(val) if isinstance(val, dict): + max_size = self._get_max_size(val) + val = self._shorten_mapping(val, max_size) return self.traverse_dict(val) if isinstance(val, (string_types, sequence_types)):