Skip to content

Conversation

@trevor-e
Copy link
Member

@trevor-e trevor-e commented Dec 19, 2025

Adds a new endpoint we can query from Dashboards to fetch preprod EAP data.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Dec 19, 2025
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Dec 19, 2025
@github-actions
Copy link
Contributor

🚨 Warning: This pull request contains Frontend and Backend changes!

It's discouraged to make changes to Sentry's Frontend and Backend in a single pull request. The Frontend and Backend are not atomically deployed. If the changes are interdependent of each other, they must be separated into two pull requests and be made forward or backwards compatible, such that the Backend or Frontend can be safely deployed independently.

Have questions? Please ask in the #discuss-dev-infra channel.

@codecov
Copy link

codecov bot commented Dec 19, 2025

Codecov Report

❌ Patch coverage is 88.39779% with 21 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...i/endpoints/organization_preprod_app_size_stats.py 88.13% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           master   #105309    +/-   ##
=========================================
  Coverage   80.56%    80.57%            
=========================================
  Files        9443      9444     +1     
  Lines      404657    404969   +312     
  Branches    25722     25722            
=========================================
+ Hits       326002    326290   +288     
- Misses      78223     78247    +24     
  Partials      432       432            

@trevor-e trevor-e marked this pull request as ready for review December 19, 2025 17:31
@trevor-e trevor-e requested review from a team as code owners December 19, 2025 17:31
raise ParseError("Invalid query parameters")
except (ValueError, KeyError):
logger.exception("Error while parsing app size stats request")
raise ParseError("Invalid request parameters")
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to shrink the code which lives inside the try catch block to specifically what could potentially error?

Copy link
Member

Choose a reason for hiding this comment

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

we'll will also catch any error that's raised and send it to sentry, so you do not need to add these logger.exception statements

Copy link
Member Author

Choose a reason for hiding this comment

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

I kept the logs in since it's useful to still do some searching in GCP.

response, start, end, interval_seconds, aggregate_func, aggregate_field
)

result: dict[str, Any] = {
Copy link
Member

Choose a reason for hiding this comment

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

Is there a stronger type we could leverage here? Seems this data is pretty tightly scoped other than data (i.e. start/end are ints, meta is pretty typed.)

Copy link
Member Author

Choose a reason for hiding this comment

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

I took a look around and most endpoints just return raw JSON. I could wrap this in a dataclass perhaps, but I don't think it'd buy us much since like you said the data type is a bit gnarly.

@trevor-e trevor-e merged commit 83599e5 into master Dec 22, 2025
66 of 67 checks passed
@trevor-e trevor-e deleted the telkins/app-size-endpoint branch December 22, 2025 17:38
@github-actions github-actions bot locked and limited conversation to collaborators Jan 7, 2026
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 Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants