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
13 changes: 12 additions & 1 deletion src/sentry/grouping/fingerprinting/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ def resolve_fingerprint_variable(
variable_key: str,
event: Event,
use_legacy_unknown_variable_handling: bool,
parameterize_message: bool = True,
) -> str | None:
if variable_key == "transaction":
return event.data.get("transaction") or "<no-transaction>"
Expand All @@ -230,6 +231,11 @@ def resolve_fingerprint_variable(
or get_path(event.data, "logentry", "message")
or get_path(event.data, "exception", "values", -1, "value")
)

# Fingerprint variables can be used in custom titles, and there we want the original message
if not parameterize_message:
return message or "<no-message>"

normalized_message = (
normalize_message_for_grouping(message, event, source="fingerprint", trim_message=False)
if message
Expand Down Expand Up @@ -332,7 +338,12 @@ def _handle_match(match: re.Match[str]) -> str:
# can remove `use_legacy_unknown_variable_handling` and just return the value given by
# `resolve_fingerprint_variable`
resolved_value = resolve_fingerprint_variable(
variable_key, event, use_legacy_unknown_variable_handling
variable_key,
event,
use_legacy_unknown_variable_handling,
# Parameterization is useful for grouping, but we want to show the real error message in
# the event/issue title
parameterize_message=False,
)

# TODO: Once we have fully transitioned off of the `newstyle:2023-01-11` grouping config, we
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ config:
fingerprint:
- dogs are great
- '{{ message }}'
title: 'Number <int> dog, dog #<int>'
title: 'Number 1 dog, dog #1'
variants:
custom_server_fingerprint:
contributes: true
Expand Down
Loading