Skip to content

feat(explore): Add support for apdex and user misery #94919

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

shruthilayaj
Copy link
Member

@shruthilayaj shruthilayaj commented Jul 4, 2025

Adds support for apdex and user misery. Note that the is_transaction filter is built into the formulas.

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

codecov bot commented Jul 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #94919    +/-   ##
========================================
  Coverage   87.89%   87.89%            
========================================
  Files       10446    10446            
  Lines      604045   604157   +112     
  Branches    23517    23517            
========================================
+ Hits       530913   531023   +110     
- Misses      72769    72771     +2     
  Partials      363      363            

@shruthilayaj shruthilayaj changed the title feat(explore): Add support for apdex feat(explore): Add support for apdex and user misery Jul 4, 2025
@shruthilayaj shruthilayaj marked this pull request as ready for review July 4, 2025 19:27
@shruthilayaj shruthilayaj requested a review from a team as a code owner July 4, 2025 19:27
cursor[bot]

This comment was marked as outdated.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Threshold Casting Issue Affects APDEX Calculation

The apdex and user_misery functions cast the threshold argument to int, but their argument definitions allow "number" types (including floats). This causes float thresholds to be truncated, leading to a loss of precision in calculations.

src/sentry/search/eap/spans/formulas.py#L815-L816

response_time_field = cast(AttributeKey, args[0])
threshold = cast(int, args[1])

src/sentry/search/eap/spans/formulas.py#L942-L943

response_time_field = cast(AttributeKey, args[0])
threshold = cast(int, args[1])

Fix in CursorFix in Web


Was this report helpful? Give feedback by reacting with 👍 or 👎

Copy link

cursor bot commented Jul 4, 2025

🚨 BugBot couldn't run

Something went wrong. Try again by commenting "bugbot run", or contact support (requestId: serverGenReqId_a4a619f6-4bca-45ee-a06f-edf7209024c4).

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