Skip to content

Commit d2c0397

Browse files
author
Bartek Ogryczak
committed
fix(grouping): Callee and Caller Matchers have neither key nor pattern
1 parent 05dfba2 commit d2c0397

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/sentry/grouping/enhancer/__init__.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ def add_to_hint(self, hint, var):
112112

113113

114114
class Enhancements:
115-
116115
# NOTE: You must add a version to ``VERSIONS`` any time attributes are added
117116
# to this class, s.t. no enhancements lacking these attributes are loaded
118117
# from cache.
@@ -181,7 +180,6 @@ def update_frame_components_contributions(self, components, frames, platform, ex
181180
stacktrace_state = StacktraceState()
182181
# Apply direct frame actions and update the stack state alongside
183182
for rule in self._updater_rules:
184-
185183
for idx, action in rule.get_matching_frame_actions(
186184
match_frames, platform, exception_data, in_memory_cache
187185
):
@@ -354,7 +352,12 @@ def _as_updater_rule(self) -> Rule | None:
354352
def as_dict(self):
355353
matchers = {}
356354
for matcher in self.matchers:
357-
matchers[matcher.key] = matcher.pattern
355+
if isinstance(matcher, CalleeMatch):
356+
matchers["callee"] = f"{matcher.caller.description} {matcher.description}"
357+
elif isinstance(matcher, CallerMatch):
358+
matchers["caller"] = f"{matcher.description} {matcher.caller.description}"
359+
else:
360+
matchers[matcher.key] = matcher.pattern
358361
return {"match": matchers, "actions": [str(x) for x in self.actions]}
359362

360363
def get_matching_frame_actions(

0 commit comments

Comments
 (0)