Skip to content

Commit 11d3d31

Browse files
committed
Remove strategy, leave fingerprinting
1 parent 017a757 commit 11d3d31

File tree

2 files changed

+13
-41
lines changed

2 files changed

+13
-41
lines changed

src/sentry/grouping/strategies/configurations.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,3 @@ def register_grouping_config(id: str, **kwargs) -> type[StrategyConfiguration]:
7272
initial_context={},
7373
enhancements_base="all-platforms:2025-11-21",
7474
)
75-
76-
# Experimental config with thread-aware grouping
77-
THREAD_GROUPING_CONFIG = "newstyle:2025-with-threads"
78-
register_grouping_config(
79-
id=THREAD_GROUPING_CONFIG,
80-
base=FALL_2025_GROUPING_CONFIG,
81-
initial_context={
82-
# Enable thread name in automatic grouping
83-
# When enabled, errors in different threads (by name) will create separate issues
84-
"include_thread_name_in_grouping": True
85-
},
86-
enhancements_base="all-platforms:2025-11-21",
87-
)

src/sentry/grouping/strategies/newstyle.py

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from typing import TYPE_CHECKING, Any
99

1010
from sentry.grouping.component import (
11-
BaseGroupingComponent,
1211
ChainedExceptionGroupingComponent,
1312
ContextLineGroupingComponent,
1413
ErrorTypeGroupingComponent,
@@ -23,7 +22,6 @@
2322
NSErrorDomainGroupingComponent,
2423
NSErrorGroupingComponent,
2524
StacktraceGroupingComponent,
26-
ThreadNameGroupingComponent,
2725
ThreadsGroupingComponent,
2826
)
2927
from sentry.grouping.strategies.base import (
@@ -615,10 +613,19 @@ def single_exception(
615613
)
616614

617615
values: list[ExceptionGroupingComponentChildren] = []
616+
618617
if ns_error_component is not None:
619-
values = [stacktrace_component, type_component, ns_error_component, value_component]
618+
values = [type_component, value_component, ns_error_component, stacktrace_component]
620619
else:
621-
values = [stacktrace_component, type_component, value_component]
620+
values = [type_component, value_component, stacktrace_component]
621+
622+
# TODO: Once we're fully transitioned off of the `newstyle:2023-01-11` config, the code here
623+
# (and the option controlling it) can be deleted
624+
if context.get("use_legacy_exception_subcomponent_order"):
625+
if ns_error_component is not None:
626+
values = [stacktrace_component, type_component, ns_error_component, value_component]
627+
else:
628+
values = [stacktrace_component, type_component, value_component]
622629

623630
exception_components_by_variant[variant_name] = ExceptionGroupingComponent(
624631
values=values, frame_counts=stacktrace_component.frame_counts
@@ -875,46 +882,24 @@ def threads(
875882
def _get_thread_components(
876883
threads: list[dict[str, Any]], event: Event, context: GroupingContext, **kwargs: dict[str, Any]
877884
) -> ComponentsByVariant | None:
878-
# Only process single-thread scenarios (existing behavior)
879-
# Multiple threads are ambiguous for grouping
880885
if len(threads) != 1:
881886
return None
882887

883-
thread = threads[0]
884-
stacktrace = thread.get("stacktrace")
885-
886-
# Check if config enables thread name in grouping via initial_context
887-
include_thread_name = context.get("include_thread_name_in_grouping", False)
888-
889-
# Collect thread metadata components (only thread name, as IDs are random)
890-
thread_metadata: list[BaseGroupingComponent[str]] = []
891-
if include_thread_name and thread.get("name"):
892-
thread_metadata.append(
893-
ThreadNameGroupingComponent(
894-
values=[thread["name"]],
895-
contributes=True,
896-
hint="thread name included in grouping",
897-
)
898-
)
899-
900-
# If no stacktrace, return early (thread metadata can't group without frames)
888+
stacktrace = threads[0].get("stacktrace")
901889
if not stacktrace:
902890
return {
903891
"app": ThreadsGroupingComponent(
904892
contributes=False, hint="ignored because thread has no stacktrace"
905893
)
906894
}
907895

908-
# Build stacktrace components for each variant with thread metadata
909896
thread_components_by_variant = {}
910897

911898
for variant_name, stacktrace_component in context.get_grouping_components_by_variant(
912899
stacktrace, event=event, **kwargs
913900
).items():
914901
thread_components_by_variant[variant_name] = ThreadsGroupingComponent(
915-
values=[stacktrace_component],
916-
frame_counts=stacktrace_component.frame_counts,
917-
metadata=thread_metadata,
902+
values=[stacktrace_component], frame_counts=stacktrace_component.frame_counts
918903
)
919904

920905
return thread_components_by_variant

0 commit comments

Comments
 (0)