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:

  1. Navigate to the Trace Explorer page.
  2. Ensure that the appropriate compartment and APM domain are selected.
  3. 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.

  4. Edit the query to meet your specific requirements.
  5. Click the Open or save query icon adjacent to the query field and click Save...

    Open or save query icon and options

  6. In the Save Query dialog:
    1. 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.
    2. Query Name: Enter a name for the query.
    3. Query Description: Optionally, enter a description for the query.
    4. 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.
    5. Click Save.

The edited query is saved.

Open a Saved Query

To open a saved query:

  1. Navigate to the Trace Explorer page.
  2. Ensure that the appropriate compartment and APM domain are selected.
  3. Click the Open or save query icon adjacent to the query field and click Open...
  4. In the Open Saved Query dialog:
    1. 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.
    2. Search by Name, Description or Query: Optionally, search for the saved query by entering a part of the name, description, or query.
    3. Saved Queries: Select the saved query that you want to open.
    4. 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:

  1. Navigate to the Administration page.
  2. 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 (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.