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-api): Sentry can receive val_double in addition to val_float #83566

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

xurui-c
Copy link
Member

@xurui-c xurui-c commented Jan 16, 2025

https://github.com/getsentry/eap-planning/issues/147

Update plan:

  1. Sentry can receive doubles and floats
  2. Snuba can receive and return doubles and floats. In the case of aggregation, replace float with double. This is fine because Sentry handles the case of receiving doubles already
  3. Sentry asks for doubles only

This PR addresses step 1

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

codecov bot commented Jan 16, 2025

Codecov Report

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

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
src/sentry/snuba/spans_rpc.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #83566      +/-   ##
==========================================
+ Coverage   87.55%   87.66%   +0.10%     
==========================================
  Files        9409     9492      +83     
  Lines      537866   538830     +964     
  Branches    21179    21179              
==========================================
+ Hits       470916   472346    +1430     
+ Misses      66602    66136     -466     
  Partials      348      348              

@xurui-c xurui-c force-pushed the rachel/sentrydoubles branch from 4e9cf98 to 43a5735 Compare January 16, 2025 06:41
@xurui-c xurui-c force-pushed the rachel/sentrydoubles branch from 43a5735 to 60e425d Compare January 16, 2025 06:45
@xurui-c xurui-c force-pushed the rachel/sentrydoubles branch from 60e425d to 6fe0ca1 Compare January 16, 2025 07:15
@xurui-c xurui-c changed the title c fix(eap-api): receiving end handles val_double in addition to val_float Jan 16, 2025
@xurui-c xurui-c force-pushed the rachel/sentrydoubles branch from 6fe0ca1 to 924ae82 Compare January 16, 2025 08:13
@xurui-c xurui-c changed the title fix(eap-api): receiving end handles val_double in addition to val_float fix(eap-api): receiving end handles val_double in addition to val_float Jan 16, 2025
@xurui-c xurui-c changed the title fix(eap-api): receiving end handles val_double in addition to val_float fix(eap-api): Sentry can receive val_double in addition to val_float Jan 16, 2025
@phacops phacops marked this pull request as ready for review January 16, 2025 22:37
@phacops phacops requested review from a team as code owners January 16, 2025 22:37
@xurui-c xurui-c merged commit 549d834 into master Jan 16, 2025
52 checks passed
@xurui-c xurui-c deleted the rachel/sentrydoubles branch January 16, 2025 22:54
xurui-c added a commit that referenced this pull request Jan 17, 2025
Follow up on #83566

Even when Snuba sends back doubles, Sentry uses `TYPE_MAP` to resolve
them into floats. This is unintended behavior. This PR makes it so that
Sentry looks at Snuba's response to determine if the values are doubles,
instead of looking at `TYPE_MAP` to determine that.

Co-authored-by: Rachel Chen <rachelchen@PL6VFX9HP4.attlocal.net>
xurui-c added a commit to getsentry/snuba that referenced this pull request Jan 22, 2025
…ing floats (#6782)

Update plan:

1. Sentry can receive doubles and floats
2. Snuba can receive (from Sentry) and return (to Sentry) doubles and
floats. In the case of aggregation, replace float with double. This is
fine because Sentry handles the case of receiving doubles already
3. Sentry asks for doubles only

This PR addresses step 2. Step 1's PR is here:
getsentry/sentry#83566

For every test that involved floats, I added a corresponding test with
doubles. It ensures backward compatibility by verifying that Snuba can
handle both floats and doubles

---------

Co-authored-by: Rachel Chen <rachelchen@PL6VFX9HP4.attlocal.net>
Co-authored-by: Rachel Chen <rachelchen@PL6VFX9HP4.local>
andrewshie-sentry pushed a commit that referenced this pull request Jan 22, 2025
…at` (#83566)

Update plan:
1. Sentry can receive doubles and floats
2. Snuba can receive and return doubles and floats. In the case of
aggregation, replace float with double. This is fine because Sentry
handles the case of receiving doubles already
3. Sentry asks for doubles only

---------

Co-authored-by: Rachel Chen <rachelchen@PL6VFX9HP4.attlocal.net>
andrewshie-sentry pushed a commit that referenced this pull request Jan 22, 2025
Follow up on #83566

Even when Snuba sends back doubles, Sentry uses `TYPE_MAP` to resolve
them into floats. This is unintended behavior. This PR makes it so that
Sentry looks at Snuba's response to determine if the values are doubles,
instead of looking at `TYPE_MAP` to determine that.

Co-authored-by: Rachel Chen <rachelchen@PL6VFX9HP4.attlocal.net>
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.

3 participants