Skip to content

Commit 4c0d2eb

Browse files
committed
add SeerSimilarIssueData dataclass
1 parent da9f2ec commit 4c0d2eb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/sentry/seer/utils.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
from dataclasses import dataclass
23
from typing import NotRequired, TypedDict
34

45
import sentry_sdk
@@ -106,6 +107,17 @@ class SimilarIssuesEmbeddingsResponse(TypedDict):
106107
responses: list[RawSeerSimilarIssueData]
107108

108109

110+
# Like the data that comes back from seer, but guaranteed to have a parent group id
111+
@dataclass
112+
class SeerSimilarIssueData:
113+
stacktrace_distance: float
114+
message_distance: float
115+
should_group: bool
116+
parent_group_id: int
117+
# TODO: See if we end up needing the hash here
118+
parent_group_hash: str | None = None
119+
120+
109121
def get_similar_issues_embeddings(
110122
similar_issues_request: SimilarIssuesEmbeddingsRequest,
111123
) -> SimilarIssuesEmbeddingsResponse:

0 commit comments

Comments
 (0)