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
4 changes: 2 additions & 2 deletions src/sentry/tasks/llm_issue_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ def create_issue_occurrence_from_detection(
event_id = uuid4().hex
occurrence_id = uuid4().hex
detection_time = datetime.now(UTC)
project = Project.objects.get_from_cache(id=project_id)

fingerprint = [f"llm-detected-{detected_issue.title}-{transaction_name}"]

Expand Down Expand Up @@ -125,13 +126,12 @@ def create_issue_occurrence_from_detection(
event_data = {
"event_id": event_id,
"project_id": project_id,
"platform": "other",
"platform": project.platform or "other",
"received": detection_time.isoformat(),
"timestamp": detection_time.isoformat(),
"tags": {
"trace_id": trace.trace_id,
"transaction": transaction_name,
"llm_detected": "true",
},
}

Expand Down
1 change: 0 additions & 1 deletion tests/sentry/tasks/test_llm_issue_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ def test_create_issue_occurrence_from_detection(self, mock_produce_occurrence):
assert event_data["platform"] == "other"
assert event_data["tags"]["trace_id"] == "abc123xyz"
assert event_data["tags"]["transaction"] == "test_transaction"
assert event_data["tags"]["llm_detected"] == "true"
assert "event_id" in event_data
assert "received" in event_data
assert "timestamp" in event_data
Expand Down
Loading