File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed
src/sentry/grouping/enhancer Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -755,18 +755,17 @@ def assemble_stacktrace_component(
755
755
756
756
return stacktrace_component
757
757
758
- @cached_property
759
- def base64_string (self ) -> str :
760
- """A base64 string representation of the enhancements object"""
758
+ def _get_base64_bytes_from_rules (self , rules : list [EnhancementRule ]) -> bytes :
761
759
pickled = msgpack .dumps (
762
- [
763
- self .version ,
764
- self .bases ,
765
- [rule ._to_config_structure (self .version ) for rule in self .rules ],
766
- ]
760
+ [self .version , self .bases , [rule ._to_config_structure (self .version ) for rule in rules ]]
767
761
)
768
762
compressed_pickle = zstandard .compress (pickled )
769
- base64_bytes = base64 .urlsafe_b64encode (compressed_pickle ).strip (b"=" )
763
+ return base64 .urlsafe_b64encode (compressed_pickle ).strip (b"=" )
764
+
765
+ @cached_property
766
+ def base64_string (self ) -> str :
767
+ """A base64 string representation of the enhancements object"""
768
+ base64_bytes = self ._get_base64_bytes_from_rules (self .rules )
770
769
base64_str = base64_bytes .decode ("ascii" )
771
770
return base64_str
772
771
You can’t perform that action at this time.
0 commit comments