feat(explore): Adds prebuilt queries to Explore#90720
Merged
Merged
Conversation
e978b34 to
6b1123c
Compare
Codecov ReportAttention: Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #90720 +/- ##
===========================================
+ Coverage 32.90% 78.01% +45.11%
===========================================
Files 8716 10296 +1580
Lines 485775 584012 +98237
Branches 22588 22528 -60
===========================================
+ Hits 159822 455607 +295785
+ Misses 325529 127991 -197538
+ Partials 424 414 -10 |
ab6a17b to
ac82a58
Compare
Contributor
Author
|
Moved db migrations to the following pr for easier review |
narsaynorath
approved these changes
May 5, 2025
Base automatically changed from
egou/feat/explore-prebuilt-saved-queries-model-changes
to
master
May 5, 2025 17:29
Co-authored-by: Nar Saynorath <nar.saynorath@sentry.io>
…xplore-prebuilt-queries
…ntry/sentry into egou/feat/explore-prebuilt-queries
Contributor
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
andrewshie-sentry
pushed a commit
that referenced
this pull request
May 12, 2025
Adds prebuilt queries to Explore: - `PREBUILT_SAVED_QUERIES` are saved as hardcoded dicts in `explore_saved_queries.py`. - On the first time `GET` is called on `ExploreSavedQueriesEndpoint`, we insert `PREBUILT_SAVED_QUERIES` entries into the saved queries db table, if they do not already exist. We also update or delete saved prebuilt queries in the db if there are changes detected (see `sync_prebuilt_queries`). - If it's the first time a user is fetching prebuilt queries, we also "star" them for the user by default. See `sync_prebuilt_queries_starred`. - This allows users to (mostly) interact with prebuilt queries in the same way as user generated saved queries (ie star, reorder star position, search filter, search sort, duplicate, etc). This also allows Sentry to add, change, or delete any prebuilt queries in the future. We do not allow users to delete or edit prebuilt queries.
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.
Adds prebuilt queries to Explore:
PREBUILT_SAVED_QUERIESare saved as hardcoded dicts inexplore_saved_queries.py.On the first time
GETis called onExploreSavedQueriesEndpoint, we insertPREBUILT_SAVED_QUERIESentries into the saved queries db table, if they do not already exist. We also update or delete saved prebuilt queries in the db if there are changes detected (seesync_prebuilt_queries).If it's the first time a user is fetching prebuilt queries, we also "star" them for the user by default. See
sync_prebuilt_queries_starred.This allows users to (mostly) interact with prebuilt queries in the same way as user generated saved queries (ie star, reorder star position, search filter, search sort, duplicate, etc). This also allows Sentry to add, change, or delete any prebuilt queries in the future. We do not allow users to delete or edit prebuilt queries.