Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/sentry/grouping/fingerprinting/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def resolve_fingerprint_variable(
exception_type = get_path(event.data, "exception", "values", -1, "type")
return exception_type or "<no-type>"

elif variable_key in ("value", "error.value"):
elif variable_key in ("value", "raw_value", "error.value", "error.raw_value"):
value = get_path(event.data, "exception", "values", -1, "value")
return value or "<no-value>"

Expand Down Expand Up @@ -337,7 +337,10 @@ def _resolve_single_entry(entry: str) -> str:
if resolved_value is None: # variable wasn't recognized
return entry

if variable_key == "message" and resolved_value != "<no-message>":
if variable_key in ("message", "value", "error.value") and resolved_value not in (
"<no-message>",
"<no-value>",
):
return normalize_message_for_grouping(
resolved_value, context, reason="fingerprint_variable", trim_message=False
)
Expand Down
4 changes: 4 additions & 0 deletions tests/sentry/grouping/test_fingerprinting.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,11 @@ def test_variable_resolution() -> None:
("{{ default }}", "{{ default }}"),
("{{ dog }}", "<unrecognized-variable-dog>"),
("{{ message }}", "That's ball number <int> that Charlie hasn't brought back!"),
("{{ value }}", "That's ball number <int> that Charlie hasn't brought back!"),
("{{ error.value }}", "That's ball number <int> that Charlie hasn't brought back!"),
("{{ raw_message }}", "That's ball number 6 that Charlie hasn't brought back!"),
("{{ raw_value }}", "That's ball number 6 that Charlie hasn't brought back!"),
("{{ error.raw_value }}", "That's ball number 6 that Charlie hasn't brought back!"),
]:
assert resolve_fingerprint_values([fingerprint_entry], event, context) == [
expected_resolved_value
Expand Down
Loading