feat(preprod): Hook size analysis detector to diff#108209
Merged
Conversation
Contributor
|
This PR has a migration; here is the generated SQL for for --
-- Create model SizeAnalysisSubscription
--
CREATE TABLE "sentry_sizeanalysissubscription" ("id" bigint NOT NULL PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY, "date_updated" timestamp with time zone NOT NULL, "date_added" timestamp with time zone NOT NULL, "project_id" bigint NOT NULL);
ALTER TABLE "sentry_sizeanalysissubscription" ADD CONSTRAINT "sentry_sizeanalysiss_project_id_41e3355e_fk_sentry_pr" FOREIGN KEY ("project_id") REFERENCES "sentry_project" ("id") DEFERRABLE INITIALLY DEFERRED NOT VALID;
ALTER TABLE "sentry_sizeanalysissubscription" VALIDATE CONSTRAINT "sentry_sizeanalysiss_project_id_41e3355e_fk_sentry_pr";
CREATE INDEX CONCURRENTLY "sentry_sizeanalysissubscription_project_id_41e3355e" ON "sentry_sizeanalysissubscription" ("project_id"); |
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
a50e1e0 to
5317fb3
Compare
This was referenced Feb 13, 2026
5317fb3 to
affc2c2
Compare
cb6d43f to
7b2967d
Compare
affc2c2 to
258f072
Compare
7b2967d to
f5ae972
Compare
258f072 to
92722b1
Compare
chromy
added a commit
that referenced
this pull request
Feb 20, 2026
Add PreprodSizeAnalysisGroupType (type_id=11003) with detector handler and validators that integrate with the workflow engine to emit issues when build size thresholds are exceeded. - PreprodSizeAnalysisDetectorHandler: evaluates DataPackets from size comparisons and produces IssueOccurrences - PreprodSizeAnalysisDetectorValidato validate detector creation via the API - Register the GroupType import in preprod/grouptype.py PRs: - #108208 Add size_analysis detector (this PR) - #108209 Hook size analysis detector to diff - #108210 Add new issue type to frontend - #108211 Add size monitor UI [Design doc](https://www.notion.so/sentry/Size-Monitors-3068b10e4b5d805ca57de084d1b4eba6) This stack of PRs is missing a handful of important features: - Filters - Detailed data on the occurrence - Some UI polish but it works end to end.
f5ae972 to
c1d2a73
Compare
c1d2a73 to
2c73f84
Compare
2c73f84 to
00f3d9a
Compare
chromy
added a commit
that referenced
this pull request
Feb 23, 2026
Add PREPROD_SIZE_ANALYSIS to the IssueType enum, IssueTitle mapping, and occurrence type lookup (type_id 11003) so the frontend can recognize and label Size Analysis issues. PRs: - #108208 Add size_analysis detector - #108209 Hook size analysis detector to diff - #108210 Add new issue type to frontend (this PR) - #108211 Add size monitor UI The old issue types will later be deprecated: ``` 11001: IssueType.PREPROD_STATIC, 11002: IssueType.PREPROD_DELTA, ``` [Design doc](https://www.notion.so/sentry/Size-Monitors-3068b10e4b5d805ca57de084d1b4eba6)
runningcode
approved these changes
Feb 23, 2026
Contributor
runningcode
left a comment
There was a problem hiding this comment.
This simplifies this quite a bit! So many removed tests.
priscilawebdev
pushed a commit
that referenced
this pull request
Feb 24, 2026
Add PreprodSizeAnalysisGroupType (type_id=11003) with detector handler and validators that integrate with the workflow engine to emit issues when build size thresholds are exceeded. - PreprodSizeAnalysisDetectorHandler: evaluates DataPackets from size comparisons and produces IssueOccurrences - PreprodSizeAnalysisDetectorValidato validate detector creation via the API - Register the GroupType import in preprod/grouptype.py PRs: - #108208 Add size_analysis detector (this PR) - #108209 Hook size analysis detector to diff - #108210 Add new issue type to frontend - #108211 Add size monitor UI [Design doc](https://www.notion.so/sentry/Size-Monitors-3068b10e4b5d805ca57de084d1b4eba6) This stack of PRs is missing a handful of important features: - Filters - Detailed data on the occurrence - Some UI polish but it works end to end.
priscilawebdev
pushed a commit
that referenced
this pull request
Feb 24, 2026
Add PREPROD_SIZE_ANALYSIS to the IssueType enum, IssueTitle mapping, and occurrence type lookup (type_id 11003) so the frontend can recognize and label Size Analysis issues. PRs: - #108208 Add size_analysis detector - #108209 Hook size analysis detector to diff - #108210 Add new issue type to frontend (this PR) - #108211 Add size monitor UI The old issue types will later be deprecated: ``` 11001: IssueType.PREPROD_STATIC, 11002: IssueType.PREPROD_DELTA, ``` [Design doc](https://www.notion.so/sentry/Size-Monitors-3068b10e4b5d805ca57de084d1b4eba6)
mchen-sentry
pushed a commit
that referenced
this pull request
Feb 24, 2026
Add PreprodSizeAnalysisGroupType (type_id=11003) with detector handler and validators that integrate with the workflow engine to emit issues when build size thresholds are exceeded. - PreprodSizeAnalysisDetectorHandler: evaluates DataPackets from size comparisons and produces IssueOccurrences - PreprodSizeAnalysisDetectorValidato validate detector creation via the API - Register the GroupType import in preprod/grouptype.py PRs: - #108208 Add size_analysis detector (this PR) - #108209 Hook size analysis detector to diff - #108210 Add new issue type to frontend - #108211 Add size monitor UI [Design doc](https://www.notion.so/sentry/Size-Monitors-3068b10e4b5d805ca57de084d1b4eba6) This stack of PRs is missing a handful of important features: - Filters - Detailed data on the occurrence - Some UI polish but it works end to end.
mchen-sentry
pushed a commit
that referenced
this pull request
Feb 24, 2026
Add PREPROD_SIZE_ANALYSIS to the IssueType enum, IssueTitle mapping, and occurrence type lookup (type_id 11003) so the frontend can recognize and label Size Analysis issues. PRs: - #108208 Add size_analysis detector - #108209 Hook size analysis detector to diff - #108210 Add new issue type to frontend (this PR) - #108211 Add size monitor UI The old issue types will later be deprecated: ``` 11001: IssueType.PREPROD_STATIC, 11002: IssueType.PREPROD_DELTA, ``` [Design doc](https://www.notion.so/sentry/Size-Monitors-3068b10e4b5d805ca57de084d1b4eba6)
mchen-sentry
pushed a commit
that referenced
this pull request
Feb 24, 2026
Replace direct Kafka occurrence production with the workflow engine's DataPacket pipeline. maybe_emit_issues() now looks up SizeAnalysisSubscriptions for the project and feeds size deltas into process_data_packet(), which resolves linked detectors and evaluates them instead of using a hardcoded threshold. PRs: - #108208 Add size_analysis detector - #108209 Hook size analysis detector to diff (this PR) - #108210 Add new issue type to frontend - #108211 Add size monitor UI [Design doc](https://www.notion.so/sentry/Size-Monitors-3068b10e4b5d805ca57de084d1b4eba6)
chromy
added a commit
that referenced
this pull request
Feb 26, 2026
Add list, detail, and create/edit views for the preprod_size_analysis
detector type ("Mobile Builds"). Users can configure a metric
(install/download size), measurement (absolute/diff/relative), optional
build filters, and priority thresholds. Includes a live preview section,
detector type selection form, and routes at /detectors/mobile-builds/.
PRs:
- #108208 Add size_analysis detector
- #108209 Hook size analysis detector to diff
- #108210 Add new issue type to frontend
- #108211 Add size monitor UI (this PR)
[Design
doc](https://www.notion.so/sentry/Size-Monitors-3068b10e4b5d805ca57de084d1b4eba6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace direct Kafka occurrence production with the workflow engine's
DataPacket pipeline. maybe_emit_issues() now looks up
SizeAnalysisSubscriptions for the project and feeds size deltas into
process_data_packet(), which resolves linked detectors and evaluates
them instead of using a hardcoded threshold.
PRs:
Design doc