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

feat(rpc): Add top events support #81217

Merged
merged 5 commits into from
Nov 27, 2024
Merged

Conversation

wmak
Copy link
Member

@wmak wmak commented Nov 22, 2024

  • This allows the usage of top_events with the useRpc param

- This allows the usage of top_events with the useRpc param
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 22, 2024
Copy link

codecov bot commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 93.97590% with 5 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/search/eap/spans.py 75.00% 4 Missing ⚠️
src/sentry/snuba/spans_rpc.py 98.46% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #81217      +/-   ##
==========================================
+ Coverage   80.35%   80.36%   +0.01%     
==========================================
  Files        7219     7218       -1     
  Lines      319567   319540      -27     
  Branches    20769    20744      -25     
==========================================
+ Hits       256780   256801      +21     
+ Misses      62393    62347      -46     
+ Partials      394      392       -2     

@wmak wmak marked this pull request as ready for review November 25, 2024 21:43
@wmak wmak requested a review from a team as a code owner November 25, 2024 21:43
@@ -259,6 +224,40 @@ def _resolve_terms(self, terms: event_filter.ParsedTerms) -> TraceItemFilter | N
else:
return None

def resolve_term(self, term: event_search.SearchFilter) -> TraceItemFilter | None:
Copy link
Member

Choose a reason for hiding this comment

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

This doesnt look like it can return None right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, that cleans up typing a bit

Comment on lines +277 to +278
rpc_response = snuba_rpc.timeseries_rpc(rpc_request)
other_response = snuba_rpc.timeseries_rpc(other_request)
Copy link
Member

Choose a reason for hiding this comment

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

Should we have a way to run these queries in parallel?

Copy link
Member Author

Choose a reason for hiding this comment

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

True i'll add that in a follow up

- When results is empty we should return an empty list not None
@wmak wmak merged commit 2765ed3 into master Nov 27, 2024
50 checks passed
@wmak wmak deleted the wmak/feat/add-top-events-support branch November 27, 2024 16:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants