- Observability: other versions:
- What is Elastic Observability?
- What’s new in 8.14
- Get started
- Observability AI Assistant
- Application performance monitoring (APM)
- Self manage APM Server
- Data Model
- Features
- Navigate the APM UI
- Perform common tasks in the APM UI
- Configure APM agents with central config
- Control access to APM data
- Create an alert
- Create and upload source maps (RUM)
- Create custom links
- Filter data
- Find transaction latency and failure correlations
- Identify deployment details for APM agents
- Integrate with machine learning
- Explore mobile sessions with Discover
- Observe Lambda functions
- Query your data
- Storage Explorer
- Track deployments with annotations
- OpenTelemetry integration
- Manage storage
- Configure
- Advanced setup
- Secure communication
- Monitor
- APM Server API
- APM UI API
- Troubleshoot
- Upgrade
- Release notes
- Known issues
- Log monitoring
- Infrastructure monitoring
- AWS monitoring
- Azure monitoring
- Synthetic monitoring
- Get started
- Scripting browser monitors
- Configure lightweight monitors
- Manage monitors
- Work with params and secrets
- Analyze monitor data
- Monitor resources on private networks
- Use the CLI
- Configure projects
- Configure Synthetics settings
- Grant users access to secured resources
- Manage data retention
- Use Synthetics with traffic filters
- Migrate from the Elastic Synthetics integration
- Scale and architect a deployment
- Synthetics support matrix
- Synthetics Encryption and Security
- Troubleshooting
- Uptime monitoring
- Real user monitoring
- Universal Profiling
- Alerting
- Service-level objectives (SLOs)
- Cases
- CI/CD observability
- Troubleshooting
- Fields reference
- Tutorials
Query your data
editQuery your data
editQuerying your APM data is an essential tool that can make finding bottlenecks in your code even more straightforward.
Using the query bar, a powerful data query feature, you can pass advanced queries on your data to filter on specific pieces of information you’re interested in.
The query bar comes with a handy autocomplete that helps find the fields and even provides suggestions to the data they include. You can select the query bar and hit the down arrow on your keyboard to begin scanning recommendations.
Querying in the APM UI
editWhen querying in the APM UI, you’re merely searching and selecting data from fields in Elasticsearch documents. Queries entered into the query bar are also added as parameters to the URL, so it’s easy to share a specific query or view with others.
When you type, you can begin to see some of the transaction fields available for filtering:

To learn more about the Kibana query language capabilities, see the Kibana Query Language Enhancements documentation.
APM UI queries
editAPM queries can be handy for removing noise from your data in the Services, Transactions, Errors, Metrics, and Traces views.
For example, in the Services view, you can quickly view a list of all the instrumented services running on your production
environment: service.environment : production
. Or filter the list by including the APM agent’s name and the host it’s running on:
service.environment : "production" and agent.name : "java" and host.name : "prod-server1"
.
On the Traces view, you might want to view failed transaction results from any of your running containers:
transaction.result :"FAILURE" and container.id : *
.
On the Transactions view, you may want to list only the slower transactions than a specified time threshold: transaction.duration.us > 2000000
.
Or filter the list by including the service version and the Kubernetes pod it’s running on:
transaction.duration.us > 2000000 and service.version : "7.12.0" and kubernetes.pod.name : "pod-5468b47f57-pqk2m"
.
Querying in Discover
editAlternatively, you can query your APM documents in Discover. Querying documents in Discover works the same way as queries in the APM UI, and Discover supports all of the example APM UI queries shown on this page.
Discover queries
editOne example where you may want to make use of Discover is to view all transactions for an endpoint instead of just a sample.
Starting in v7.6, you can view ten samples per bucket in the APM UI, instead of just one.
Use the APM UI to find a transaction name and time bucket that you’re interested in learning more about. Then, switch to Discover and make a search:
processor.event: "transaction" AND transaction.name: "<TRANSACTION_NAME_HERE>" and transaction.duration.us > 13000 and transaction.duration.us < 14000`
In this example, we’re interested in viewing all of the APIRestController#customers
transactions
that took between 13 and 14 milliseconds. Here’s what Discover returns:

You can now explore the data until you find a specific transaction that you’re interested in.
Copy that transaction’s transaction.id
and paste it into the APM UI to view the data in the context of the APM UI:

