Configure a Saved Query
You can save an edited out-of-the-box query or a custom query in Trace Explorer and open it at a later time to filter trace data.
To save a query and open it, you must have the required permissions. Here are the examples of the policies that grant a user group the required permissions:
- To save a
query:
Allow group APM-USERS to manage management-saved-search in compartment ABC
- To open a saved
query:
Allow group APM-USERS to inspect management-saved-search in compartment ABC
Save a Query
You can save a query that you have edited or created to easily access it at a later time and filter trace data in Trace Explorer based on your requirements.
Here's a sample scenario illustrating how to save an edited query in a quick pick in Trace Explorer:
- Navigate to the Trace Explorer page.
- Ensure that the appropriate compartment and APM domain are selected.
- Click the button of the quick pick whose query you want to edit,
for example, Traces.
The out-of-the-box query for this tab is displayed.
- Edit the query to meet your specific requirements.
- Click the Open or save query icon adjacent to the query field and click Save...
- In the Save Query dialog:
- Saved Query Compartment: Select the compartment in which you want to save the edited query. Note that you must have the permissions required to save the query in the selected compartment.
- Query Name: Enter a name for the query.
- Query Description: Optionally, enter a description for the query.
- Query: Review the changes you made to the query. Note that if you haven't already edited the query as mentioned in the earlier steps, you can edit it in this field.
- Click Save.
The edited query is saved.
Open a Saved Query
To open a saved query:
- Navigate to the Trace Explorer page.
- Ensure that the appropriate compartment and APM domain are selected.
- Click the Open or save query icon adjacent to the query field and click Open...
- In the Open Saved Query dialog:
- Compartment: Select the compartment in which the edited query is saved. Note that you must have the permissions required to open the queries saved in the selected compartment.
- Search by Name, Description or Query: Optionally, search for the saved query by entering a part of the name, description, or query.
- Saved Queries: Select the saved query that you want to open.
- Click Open.
The saved query is run and trace data is displayed for the time period selected in Trace Explorer.
View Saved Queries
After you save a query, it's listed on the Application Performance Monitoring Administration page.
To view the saved queries in a compartment:
- Navigate to the Administration page.
- On the left pane, select the compartment in which the query is saved, and under Resources click Queries.
The saved queries in the compartment are listed.
You can click the Actions icon () for each saved query and perform the following actions:
- Edit: Click to edit the saved query.
- Move: Click to move the query to a different compartment.
- View Tags: Click to view the tags applied to the saved query.
- Add Tags: Click to add tags to the saved query. For information on Tagging, see Tagging Overview.
- Duplicate: Click to duplicate the saved query and save it in the same compartment or another compartment.
- Copy OCID: Click to copy the OCID of the saved query.
- Delete: Click to delete the saved query.