Skip to content

fix(metrics-extraction): Fix apdex resolution in on-demand#60537

Merged
armenzg merged 1 commit intomasterfrom
fix/metrics-extraction-apdex-top-n
Nov 24, 2023
Merged

fix(metrics-extraction): Fix apdex resolution in on-demand#60537
armenzg merged 1 commit intomasterfrom
fix/metrics-extraction-apdex-top-n

Conversation

@k-fish
Copy link
Member

@k-fish k-fish commented Nov 24, 2023

Summary

Apdex was failing in Top N because it tries to build out top event conditions by resolving all fields. It's not necessary to check function fields since the data from top_events is a string -> data map, so a function will always fail regardless, and we don't want to build out conditions for functions regardless.

Apdex was failing in Top N because it tries to build out top event conditions by resolving all fields. It's not necessary to check function fields since the data from top_events is a string -> data map, so a function will always fail regardless, and we don't want to build out conditions for functions regardless.
@k-fish k-fish requested review from a team and armenzg November 24, 2023 04:06
@k-fish k-fish requested a review from a team as a code owner November 24, 2023 04:06
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 24, 2023
@codecov
Copy link

codecov bot commented Nov 24, 2023

Codecov Report

Merging #60537 (4d6fe37) into master (e13f366) will decrease coverage by 0.01%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #60537      +/-   ##
==========================================
- Coverage   80.84%   80.84%   -0.01%     
==========================================
  Files        5181     5181              
  Lines      227791   227791              
  Branches    38325    38326       +1     
==========================================
- Hits       184163   184160       -3     
  Misses      38004    38004              
- Partials     5624     5627       +3     
Files Coverage Δ
src/sentry/search/events/builder/metrics.py 88.66% <100.00%> (+0.02%) ⬆️
src/sentry/testutils/cases.py 86.08% <100.00%> (-0.03%) ⬇️

... and 5 files with indirect coverage changes

for field in self.fields:
if fields.is_function(field):
# A function will never be in a top_events dict.
continue
Copy link
Member

Choose a reason for hiding this comment

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

What a beautiful fix 😍 it makes me want to cry 😭

@armenzg armenzg merged commit 18b34bd into master Nov 24, 2023
@armenzg armenzg deleted the fix/metrics-extraction-apdex-top-n branch November 24, 2023 13:48
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2023
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants