Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(similarity): Do not send > 30 system frames to seer #81259

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

jangjodi
Copy link
Contributor

Do not send stacktraces with > 30 system frames and no in-app frames to seer

@jangjodi jangjodi requested a review from a team as a code owner November 25, 2024 19:15
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 25, 2024
Copy link

codecov bot commented Nov 25, 2024

Codecov Report

Attention: Patch coverage is 93.10345% with 2 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ssues/endpoints/group_similar_issues_embeddings.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #81259      +/-   ##
==========================================
- Coverage   80.35%   80.34%   -0.01%     
==========================================
  Files        7221     7220       -1     
  Lines      319640   319595      -45     
  Branches    20782    20782              
==========================================
- Hits       256832   256791      -41     
+ Misses      62414    62410       -4     
  Partials      394      394              

@jangjodi jangjodi merged commit 2e3a412 into master Nov 25, 2024
51 checks passed
@jangjodi jangjodi deleted the jodi/similarity-30-system-frames-redo branch November 25, 2024 21:02
@jangjodi jangjodi added the Trigger: Revert Add to a merged PR to revert it (skips CI) label Nov 25, 2024
@getsentry-bot
Copy link
Contributor

PR reverted: 104352c

getsentry-bot added a commit that referenced this pull request Nov 25, 2024
Copy link
Member

@armenzg armenzg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just looking at it again since I saw the error on Slack.

stacktrace_string = get_stacktrace_string(get_grouping_info_from_variants(variants))
stacktrace_string = get_stacktrace_string_with_metrics(
get_grouping_info_from_variants(variants), event.platform, ReferrerOptions.INGEST
)
if stacktrace_string == "":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe over here we need to check if it's None as well.


if stacktrace_string == "" or not latest_event:
if not stacktrace_string or not latest_event:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just because I always forget how Python behaves I test the following:

>>> def foo(b):
...   if not b:
...     print("hey")
... 
>>> foo("")
hey
>>> foo(None)
hey
>>> foo("bar")
>>> 

@@ -217,7 +220,10 @@ def get_seer_similar_issues(
"hash": event_hash,
"project_id": event.project.id,
"stacktrace": event.data.get(
"stacktrace_string", get_stacktrace_string(get_grouping_info_from_variants(variants))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this function, we must always prevent request_data["stacktrace"] to be None.

@jangjodi jangjodi restored the jodi/similarity-30-system-frames-redo branch November 26, 2024 17:00
andrewshie-sentry pushed a commit that referenced this pull request Dec 2, 2024
Do not send stacktraces with > 30 system frames and no in-app frames to
seer
andrewshie-sentry pushed a commit that referenced this pull request Dec 2, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Dec 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Backend Automatically applied to PRs that change backend components Trigger: Revert Add to a merged PR to revert it (skips CI)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants