From the Discover Homepage, you can build a query in three ways.
- Click on “Build a new query”
- Click on the ellipsis of an existing saved query card to “Duplicate”
- Go into any existing query
- Click on “Save as…” in the top right
- Enter a new display name
- Click “Save”
There are four main building blocks that impact the results of your saved query. You can use a combination of these to narrow down your search.
- Global Selection Header
- Search Conditions
- Interactive Graph
- Table Columns
Filter by Global Selection Header
Specify which projects, environments, and date range you want to zoom in on at the top of the page. This can also be found in other parts of Sentry as a top level filter.
Filter by Search Conditions
All events have built-in key fields or custom tags. Use the search bar to enter these keys and assign them values. This will filter down your list of events. Here are the built-in key fields.
The Query Builder syntax is identical to Sentry’s Search syntax. After you enter a key field from above or a custom tag, you can use any of the referenced syntax. For example,
count(id) gives you the number of times an event occurs. This can be written in the following ways:
- Exact match (is equal to):
- Upper bounds (is less than or equal to):
- Lower bounds (is more than or equal to):
- Multiple bounds (is more and less than):
Tag Summary Filters
Every event has a list of tag values. The tag summary (or facet map) is a visualization of the top 10 keys sorted by frequency. The most common tag value is listed directly above the bar in the description and percentage. Hover over each section in a bar to see the exact distribution for that tag.
Click on any of these sections to further refine your search. For example, clicking on a section that represents Chrome in a browser bar will automatically update the tag summary and then add Chrome to the search conditions.
Filter by Interactive Graph
Each query has a interactive graph that reflects the data presented in the table below. To zoom in, simply click and drag over the area you want to investigate. You can also customize the display and the Y-Axis. This will be saved with your query.
- Total Period
- Previous Period
- Release Markers
- Top 5 Period
- Total Daily
- Top 5 Daily
- Average Transaction Duration
- Unique User Count
Filter by Table Columns
Above the table, click “Columns” to open a modal. This will show you a list of all the columns in the results table. You can add, delete and move basic key field columns or custom tags columns. With the same view, you can also stack events with any of the following functions:
Each function will ask you to assign a parameter. Some are required while others are optional. Functions will stack events based on the same values. If no functions are applied, the events in your Query Results will remain individually listed. Once you are done editing the columns, click “Apply” and results will be reflected in the Query Results. Keep in mind, the table may horizontall scroll if too many columns are added.
You can resize columns by hovering over the column boundary, and clicking & dragging the boundary to resize the column to the desired width.
Click on the column header you would like to sort. A down arrow sorts the column in descending order and an up arrow sorts the column in ascending order. This may refresh the table.
If you want to take the data elsewhere, click on “Export” for a CSV file.
For a large export, you’ll receive an email with the download link once it’s ready. This will require further verification on the Sentry Download page. This contains a
SHA1 checksum of the file, which you can use to verify it’s integrity with the following command:
echo "<SHA1 checksum> <downloaded CSV name>" | sha1sum -c -
Each cell in the table will have an ellipsis appear on hover. This will open a context menu with additional filtering capabilities depending on the value type. For example, you can selectively target a transaction to the search conditions bar by clicking on “Add to filter”.
Additional Query Actions
If you need to edit any of these queries, go into the query, make the desired changes and a button will appear in the top right asking you to save/update the query. Keep in mind, edits to the query conditions will not be automatically saved.
To rename a saved query, click on the pencil icon by the header and enter the desired display name. Click “enter” or outside of the area to confirm.
Share your queries as often as you want. You can share URLs with other users who also have access to the same organization. As each part of the query is built, the results update, and the URL is updated so that in-progress searches can be shared in email, chat, etc.
On the Discover Homepage, each saved query card has an ellipsis that will open a context menu. Delete the query from here. You can also delete the query within Query Results view by clicking the trash can in the upper right.
For more details on how to view saved queries, see the full documentation on Discover