diff --git a/src/sentry/grouping/strategies/configurations.py b/src/sentry/grouping/strategies/configurations.py index 7546bd8da61877..a5f7f40d58a291 100644 --- a/src/sentry/grouping/strategies/configurations.py +++ b/src/sentry/grouping/strategies/configurations.py @@ -27,11 +27,6 @@ ], delegates=["frame:v1", "stacktrace:v1", "single-exception:v1"], initial_context={ - # This is a flag that can be used by any delegate to respond to - # a detected recursion. This is currently used by the frame - # strategy to disable itself. Recursion is detected by the outer - # strategy. - "is_recursion": False, # Perform automatic message trimming and parameter substitution in the message strategy. # (Should be kept on - only configurable so it can be turned off in tests.) "normalize_message": True, diff --git a/src/sentry/grouping/strategies/newstyle.py b/src/sentry/grouping/strategies/newstyle.py index 84b7e16169ab05..40466940f06c83 100644 --- a/src/sentry/grouping/strategies/newstyle.py +++ b/src/sentry/grouping/strategies/newstyle.py @@ -370,9 +370,6 @@ def frame( ): frame_component.update(contributes=False, hint="ignored low quality javascript frame") - if context["is_recursion"]: - frame_component.update(contributes=False, hint="ignored due to recursion") - return {variant_name: frame_component} @@ -437,9 +434,9 @@ def _single_stacktrace_variant( found_in_app_frame = False for frame in frames: - with context: - context["is_recursion"] = _is_recursive_frame(frame, prev_frame) - frame_component = context.get_single_grouping_component(frame, event=event, **kwargs) + frame_component = context.get_single_grouping_component(frame, event=event, **kwargs) + if _is_recursive_frame(frame, prev_frame): + frame_component.update(contributes=False, hint="ignored due to recursion") if variant_name == "app": if frame.in_app: