File tree Expand file tree Collapse file tree 4 files changed +6
-19
lines changed
tasks/embeddings_grouping
tests/sentry/seer/similarity Expand file tree Collapse file tree 4 files changed +6
-19
lines changed Original file line number Diff line number Diff line change 20
20
ReferrerOptions ,
21
21
event_content_has_stacktrace ,
22
22
filter_null_from_string ,
23
- get_stacktrace_string_with_metrics ,
23
+ get_stacktrace_string ,
24
24
has_too_many_contributing_frames ,
25
25
killswitch_enabled ,
26
26
record_did_call_seer_metric ,
@@ -200,9 +200,7 @@ def _circuit_breaker_broken(event: Event, project: Project) -> bool:
200
200
201
201
202
202
def _has_empty_stacktrace_string (event : Event , variants : dict [str , BaseVariant ]) -> bool :
203
- stacktrace_string = get_stacktrace_string_with_metrics (
204
- get_grouping_info_from_variants (variants )
205
- )
203
+ stacktrace_string = get_stacktrace_string (get_grouping_info_from_variants (variants ))
206
204
if not stacktrace_string :
207
205
if stacktrace_string == "" :
208
206
record_did_call_seer_metric (call_made = False , blocker = "empty-stacktrace-string" )
@@ -228,7 +226,7 @@ def get_seer_similar_issues(
228
226
229
227
stacktrace_string = event .data .get (
230
228
"stacktrace_string" ,
231
- get_stacktrace_string_with_metrics (get_grouping_info_from_variants (variants )),
229
+ get_stacktrace_string (get_grouping_info_from_variants (variants )),
232
230
)
233
231
234
232
if not stacktrace_string :
Original file line number Diff line number Diff line change @@ -278,16 +278,6 @@ def is_base64_encoded_frame(frame_dict: Mapping[str, Any]) -> bool:
278
278
return base64_encoded
279
279
280
280
281
- def get_stacktrace_string_with_metrics (data : dict [str , Any ]) -> str | None :
282
- stacktrace_string = None
283
- try :
284
- stacktrace_string = get_stacktrace_string (data )
285
- except Exception :
286
- logger .exception ("Unexpected exception in stacktrace string formatting" )
287
-
288
- return stacktrace_string
289
-
290
-
291
281
def event_content_has_stacktrace (event : GroupEvent | Event ) -> bool :
292
282
# If an event has no stacktrace, there's no data for Seer to analyze, so no point in making the
293
283
# API call. If we ever start analyzing message-only events, we'll need to add `event.title in
Original file line number Diff line number Diff line change 34
34
ReferrerOptions ,
35
35
event_content_has_stacktrace ,
36
36
filter_null_from_string ,
37
- get_stacktrace_string_with_metrics ,
37
+ get_stacktrace_string ,
38
38
has_too_many_contributing_frames ,
39
39
)
40
40
from sentry .snuba .dataset import Dataset
@@ -364,7 +364,7 @@ def get_events_from_nodestore(
364
364
365
365
if not has_too_many_contributing_frames (event , variants , ReferrerOptions .BACKFILL ):
366
366
grouping_info = get_grouping_info_from_variants (variants )
367
- stacktrace_string = get_stacktrace_string_with_metrics (grouping_info )
367
+ stacktrace_string = get_stacktrace_string (grouping_info )
368
368
369
369
if not stacktrace_string :
370
370
invalid_event_group_ids .append (group_id )
Original file line number Diff line number Diff line change 15
15
_is_snipped_context_line ,
16
16
filter_null_from_string ,
17
17
get_stacktrace_string ,
18
- get_stacktrace_string_with_metrics ,
19
18
has_too_many_contributing_frames ,
20
19
)
21
20
from sentry .testutils .cases import TestCase
@@ -796,7 +795,7 @@ def test_replace_file_with_module(self):
796
795
exception = copy .deepcopy (self .BASE_APP_DATA )
797
796
# delete filename from the exception
798
797
del exception ["app" ]["component" ]["values" ][0 ]["values" ][0 ]["values" ][0 ]["values" ][1 ]
799
- stacktrace_string = get_stacktrace_string_with_metrics (exception )
798
+ stacktrace_string = get_stacktrace_string (exception )
800
799
assert (
801
800
stacktrace_string
802
801
== 'ZeroDivisionError: division by zero\n File "__main__", function divide_by_zero\n divide = 1/0'
You can’t perform that action at this time.
0 commit comments