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

fix(eap-spans): update web vitals functions for eap #88242

Conversation

DominikB2014
Copy link
Contributor

@DominikB2014 DominikB2014 commented Mar 28, 2025

  1. remove total_opportunity_score function, replace with opportunity_score(measurement.score.total)
  2. Update opportunity_score to normalize from (0-1) on the backend
opportunity_score(vital) = ( count(<vital>.score.ratio) - sum(<vital>.score.ratio) ) /  total_vital_count

Where `total_vital_count` is the count of that vital without any group_by's, this way the opportunity_scores across the filtered data should add up to 1.
  1. Revamp total_opportunity_score to be
total_opportunity_score() = sumOf(  [opportunity_score(<vital>) * WEIGHT[<vital>] for vital in VITALS ]

@DominikB2014 DominikB2014 requested a review from a team as a code owner March 28, 2025 18:37
@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Mar 28, 2025
Copy link

codecov bot commented Mar 28, 2025

Codecov Report

Attention: Patch coverage is 98.55072% with 1 line in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...endpoints/test_organization_events_span_indexed.py 98.27% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #88242       +/-   ##
===========================================
+ Coverage   42.14%   87.79%   +45.65%     
===========================================
  Files        9976    10007       +31     
  Lines      565125   566679     +1554     
  Branches    22267    22210       -57     
===========================================
+ Hits       238153   497504   +259351     
+ Misses     326554    68741   -257813     
- Partials      418      434       +16     

@DominikB2014 DominikB2014 merged commit 378a7f8 into master Apr 3, 2025
48 checks passed
@DominikB2014 DominikB2014 deleted the dominikbuszowiecki/dain-132-update-web-vitals-score-functions branch April 3, 2025 01:59
Copy link

sentry-io bot commented Apr 3, 2025

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ IndexError: list index out of range /api/0/organizations/{organization_id_or_slug}/... View Issue

Did you find this useful? React with a 👍 or 👎

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