Skip to content

Commit 2ef0563

Browse files
roggenkemperandrewshie-sentry
authored andcommitted
chore(lllm-detector): Make fingerprint case insensitive (#103258)
1 parent 8874e17 commit 2ef0563

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/sentry/tasks/llm_issue_detection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ def create_issue_occurrence_from_detection(
8282
occurrence_id = uuid4().hex
8383
detection_time = datetime.now(UTC)
8484
project = Project.objects.get_from_cache(id=project_id)
85-
86-
fingerprint = [f"llm-detected-{detected_issue.title}-{transaction_name}"]
85+
title = detected_issue.title.lower().replace(" ", "-")
86+
fingerprint = [f"llm-detected-{title}-{transaction_name}"]
8787

8888
evidence_data = {
8989
"trace_id": trace.trace_id,

tests/sentry/tasks/test_llm_issue_detection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def test_create_issue_occurrence_from_detection(self, mock_produce_occurrence):
8383
assert len(occurrence.fingerprint) == 1
8484
assert (
8585
occurrence.fingerprint[0]
86-
== "llm-detected-Database Connection Pool Exhaustion-test_transaction"
86+
== "llm-detected-database-connection-pool-exhaustion-test_transaction"
8787
)
8888

8989
assert occurrence.evidence_data["trace_id"] == "abc123xyz"

0 commit comments

Comments
 (0)