Skip to content

Commit 6121fd3

Browse files
committed
getsentry/timeseries-analysis-service@d0cca2df44e0f13818faacb7c770627fb3ea97ef
1 parent aa7058c commit 6121fd3

File tree

2 files changed

+302
-2
lines changed

2 files changed

+302
-2
lines changed

seer/seer.py

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
import typing_extensions
44

5+
AutofixEndpointResponse = typing_extensions.TypedDict(
6+
"AutofixEndpointResponse",
7+
{
8+
"started": bool,
9+
},
10+
total=False,
11+
)
12+
13+
AutofixRequest = typing_extensions.TypedDict(
14+
"AutofixRequest",
15+
{
16+
"issue": "IssueDetails",
17+
"base_commit_sha": str,
18+
"additional_context": typing.Union[str, None],
19+
},
20+
total=False,
21+
)
22+
523
BreakpointEntry = typing_extensions.TypedDict(
624
"BreakpointEntry",
725
{
@@ -62,6 +80,50 @@
6280
total=False,
6381
)
6482

83+
GroupingRequest = typing_extensions.TypedDict(
84+
"GroupingRequest",
85+
{
86+
"group_id": int,
87+
"project_id": int,
88+
"stacktrace": str,
89+
"message": str,
90+
# default: 1
91+
"k": int,
92+
# default: 0.99
93+
"threshold": float,
94+
},
95+
total=False,
96+
)
97+
98+
GroupingResponse = typing_extensions.TypedDict(
99+
"GroupingResponse",
100+
{
101+
"parent_group_id": typing.Union[int, None],
102+
"stacktrace_similarity": float,
103+
"message_similarity": float,
104+
"should_group": bool,
105+
},
106+
total=False,
107+
)
108+
109+
IssueDetails = typing_extensions.TypedDict(
110+
"IssueDetails",
111+
{
112+
"id": int,
113+
"title": str,
114+
"events": typing.List["SentryEvent"],
115+
},
116+
total=False,
117+
)
118+
119+
SentryEvent = typing_extensions.TypedDict(
120+
"SentryEvent",
121+
{
122+
"entries": typing.List[typing.Mapping[str, typing.Any]],
123+
},
124+
total=False,
125+
)
126+
65127
SeverityRequest = typing_extensions.TypedDict(
66128
"SeverityRequest",
67129
{
@@ -86,10 +148,18 @@
86148
total=False,
87149
)
88150

151+
SimilarityResponse = typing_extensions.TypedDict(
152+
"SimilarityResponse",
153+
{
154+
"responses": typing.List["GroupingResponse"],
155+
},
156+
total=False,
157+
)
158+
89159
SnubaMetadata = typing_extensions.TypedDict(
90160
"SnubaMetadata",
91161
{
92-
"count": int,
162+
"count": float,
93163
},
94164
total=False,
95165
)

seer/seer_api.json

Lines changed: 231 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,109 @@
6767
},
6868
"deprecated": false
6969
}
70+
},
71+
"/v0/issues/similar-issues": {
72+
"post": {
73+
"tags": [],
74+
"operationId": "similarity_endpoint",
75+
"requestBody": {
76+
"content": {
77+
"application/json": {
78+
"schema": {
79+
"$ref": "#/components/schemas/GroupingRequest"
80+
}
81+
}
82+
},
83+
"required": true
84+
},
85+
"responses": {
86+
"200": {
87+
"description": "Success",
88+
"content": {
89+
"application/json": {
90+
"schema": {
91+
"$ref": "#/components/schemas/SimilarityResponse"
92+
}
93+
}
94+
}
95+
}
96+
},
97+
"deprecated": false
98+
}
99+
},
100+
"/v0/automation/autofix": {
101+
"post": {
102+
"tags": [],
103+
"operationId": "autofix_endpoint",
104+
"requestBody": {
105+
"content": {
106+
"application/json": {
107+
"schema": {
108+
"$ref": "#/components/schemas/AutofixRequest"
109+
}
110+
}
111+
},
112+
"required": true
113+
},
114+
"responses": {
115+
"200": {
116+
"description": "Success",
117+
"content": {
118+
"application/json": {
119+
"schema": {
120+
"$ref": "#/components/schemas/AutofixEndpointResponse"
121+
}
122+
}
123+
}
124+
}
125+
},
126+
"deprecated": false
127+
}
70128
}
71129
},
72130
"components": {
73131
"schemas": {
132+
"AutofixEndpointResponse": {
133+
"properties": {
134+
"started": {
135+
"type": "boolean",
136+
"title": "Started"
137+
}
138+
},
139+
"type": "object",
140+
"required": [
141+
"started"
142+
],
143+
"title": "AutofixEndpointResponse"
144+
},
145+
"AutofixRequest": {
146+
"properties": {
147+
"issue": {
148+
"$ref": "#/components/schemas/IssueDetails"
149+
},
150+
"base_commit_sha": {
151+
"type": "string",
152+
"title": "Base Commit Sha"
153+
},
154+
"additional_context": {
155+
"anyOf": [
156+
{
157+
"type": "string"
158+
},
159+
{
160+
"type": "null"
161+
}
162+
],
163+
"title": "Additional Context"
164+
}
165+
},
166+
"type": "object",
167+
"required": [
168+
"issue",
169+
"base_commit_sha"
170+
],
171+
"title": "AutofixRequest"
172+
},
74173
"BreakpointEntry": {
75174
"properties": {
76175
"project": {
@@ -271,6 +370,121 @@
271370
],
272371
"title": "BreakpointTransaction"
273372
},
373+
"GroupingRequest": {
374+
"properties": {
375+
"group_id": {
376+
"type": "integer",
377+
"title": "Group Id"
378+
},
379+
"project_id": {
380+
"type": "integer",
381+
"title": "Project Id"
382+
},
383+
"stacktrace": {
384+
"type": "string",
385+
"title": "Stacktrace"
386+
},
387+
"message": {
388+
"type": "string",
389+
"title": "Message"
390+
},
391+
"k": {
392+
"type": "integer",
393+
"title": "K",
394+
"default": 1
395+
},
396+
"threshold": {
397+
"type": "number",
398+
"title": "Threshold",
399+
"default": 0.99
400+
}
401+
},
402+
"type": "object",
403+
"required": [
404+
"group_id",
405+
"project_id",
406+
"stacktrace",
407+
"message"
408+
],
409+
"title": "GroupingRequest"
410+
},
411+
"GroupingResponse": {
412+
"properties": {
413+
"parent_group_id": {
414+
"anyOf": [
415+
{
416+
"type": "integer"
417+
},
418+
{
419+
"type": "null"
420+
}
421+
],
422+
"title": "Parent Group Id"
423+
},
424+
"stacktrace_similarity": {
425+
"type": "number",
426+
"title": "Stacktrace Similarity"
427+
},
428+
"message_similarity": {
429+
"type": "number",
430+
"title": "Message Similarity"
431+
},
432+
"should_group": {
433+
"type": "boolean",
434+
"title": "Should Group"
435+
}
436+
},
437+
"type": "object",
438+
"required": [
439+
"parent_group_id",
440+
"stacktrace_similarity",
441+
"message_similarity",
442+
"should_group"
443+
],
444+
"title": "GroupingResponse"
445+
},
446+
"IssueDetails": {
447+
"properties": {
448+
"id": {
449+
"type": "integer",
450+
"title": "Id"
451+
},
452+
"title": {
453+
"type": "string",
454+
"title": "Title"
455+
},
456+
"events": {
457+
"items": {
458+
"$ref": "#/components/schemas/SentryEvent"
459+
},
460+
"type": "array",
461+
"title": "Events"
462+
}
463+
},
464+
"type": "object",
465+
"required": [
466+
"id",
467+
"title",
468+
"events"
469+
],
470+
"title": "IssueDetails"
471+
},
472+
"SentryEvent": {
473+
"properties": {
474+
"entries": {
475+
"items": {
476+
"type": "object"
477+
},
478+
"type": "array",
479+
"title": "Entries"
480+
}
481+
},
482+
"type": "object",
483+
"required": [
484+
"entries"
485+
],
486+
"title": "SentryEvent"
487+
},
274488
"SeverityRequest": {
275489
"properties": {
276490
"message": {
@@ -325,10 +539,26 @@
325539
"type": "object",
326540
"title": "SeverityResponse"
327541
},
542+
"SimilarityResponse": {
543+
"properties": {
544+
"responses": {
545+
"items": {
546+
"$ref": "#/components/schemas/GroupingResponse"
547+
},
548+
"type": "array",
549+
"title": "Responses"
550+
}
551+
},
552+
"type": "object",
553+
"required": [
554+
"responses"
555+
],
556+
"title": "SimilarityResponse"
557+
},
328558
"SnubaMetadata": {
329559
"properties": {
330560
"count": {
331-
"type": "integer",
561+
"type": "number",
332562
"title": "Count"
333563
}
334564
},

0 commit comments

Comments
 (0)