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(eap-spans): add perf score function #87127

Merged

Conversation

DominikB2014
Copy link
Contributor

@DominikB2014 DominikB2014 commented Mar 14, 2025

Closes https://github.com/getsentry/team-visibility/issues/37

  1. Implements performance_score(x) function
  2. Adds attribute_resolver to AggregateDefinition to handle more complicated aggregates where we don't simply aggregate on the parameter.
  3. Some refactoring to improve readability and logic

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 14, 2025
Copy link

codecov bot commented Mar 14, 2025

Codecov Report

Attention: Patch coverage is 92.15686% with 4 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/resolver.py 86.66% 2 Missing ⚠️
...endpoints/test_organization_events_span_indexed.py 88.88% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #87127       +/-   ##
===========================================
+ Coverage   46.15%   87.76%   +41.61%     
===========================================
  Files        9841     9853       +12     
  Lines      556950   557727      +777     
  Branches    21989    21902       -87     
===========================================
+ Hits       257042   489490   +232448     
+ Misses     299524    67807   -231717     
- Partials      384      430       +46     

@DominikB2014 DominikB2014 marked this pull request as ready for review March 18, 2025 16:38
@DominikB2014 DominikB2014 requested a review from a team as a code owner March 18, 2025 16:38
Comment on lines +738 to +743
argument = arguments[index]
if argument_definition.validator is not None:
if not argument_definition.validator(argument):
raise InvalidSearchQuery(
f"{argument} is not a valid argument for {function}"
)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fyi, I moved the arguments validator under if index < len(arguments). Otherwise we could run into index out of range issues.

i.e we only need to validate arguments, if there's an argument that's being passed in

@DominikB2014 DominikB2014 merged commit 962d1e6 into master Mar 18, 2025
51 checks passed
@DominikB2014 DominikB2014 deleted the DominikB2014/implement-performance_score-function branch March 18, 2025 17:43
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