Edit a Query

You can use the clauses listed in the table above and edit out-of-the-box queries.

Here's a sample scenario illustrating how to edit a query to view the traces initiated by a specific user, John Doe:

  1. Navigate to the Trace Explorer page.
  2. Ensure that the appropriate compartment, APM domain, and time period are selected.
  3. Click the Traces quick pick button.

    The out-of-the-box query for this tab is displayed.

  4. Optionally, look for the user name dimension (UserName) in the Fields list.
  5. Add and UserName like '%John Doe%' at the end of the query:
    show (traces) TraceStatus as Status,
        TraceFirstSpanStartTime as "Start Time",
        ServiceName as Service,
        OperationName as Operation,
        TraceDuration as Duration,
        span_summary() as Spans,
        ErrorCount as "Span Errors"
      where (ApmrumPageUpdateType <> 'Click' or ApmrumPageUpdateType is omitted) and UserName like '%John Doe%'

    The list is filtered to only display the traces initiated by John Doe.

Here are a few more examples of scenarios in which you can edit queries to customize trace data:

  • View the traces by city or country: Use the group by GeoCity clause.
  • View operations categorized by the application servers they run on: Use the where OperationName='<name of the operation>' group by DisplayName clauses.
  • View how many SQLs were executed less than a 100 times in a selected time period: Use the where DbStatement is not omitted group by DbStatement having count(*) < 100 clauses.