Monitor Collection-Level Query Latency
On this page
- OAuth 2.0 authentication for programmatic access to Cloud Manager is available as a Preview feature.
- The feature and the corresponding documentation might change at any time during the Preview period. To use OAuth 2.0 authentication, create a service account to use in your requests to the Cloud Manager Public API.
Monitor collection-level query latency with Query Insights. The Query Insights page displays two charts and a table with information for each top or pinned namespace. The information includes query latency metrics and statistics for certain hosts and operation types. You can manage pinned namespaces and choose up to five namespaces to show in the corresponding query latency charts.
Considerations
The Query Insights page is supported only for MongoDB 4.4.2 or later and the MongoDB Agent 13.8.1.8563-1 or later.
If you have Queryable Encryption enabled for a collection, Query Insights doesn't display the collection in this location. Cloud Manager redacts this information.
Cloud Manager displays top namespaces by default. Depending on the time range, a namespace might fall in and out of the monitored list. Cloud Manager interpolates missing data when at least one host metric exists in both ends of the time range. If MongoDB Atlas encounters missing data, dotted lines connect the available data points.
If you reach the data limit for a page load, the following error message appears:
Chart data limit reached. Try a smaller time window or fewer hosts. The Query Insights page doesn't support time series collections.
Access Query Insights
To access Query Insights:
In MongoDB Cloud Manager, go to the Deployment page for your project.
If it is not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
If it's not already displayed, select your desired project from the Projects menu in the navigation bar.
If the Deployment page is not already displayed, click Deployment in the sidebar.
The Deployment page displays.
Filter Query Insights
You can filter Namespace Insights by host state, hosts, time intervals, and a time range.
To filter Query Insights:
(Optional) Filter by host state, shard, or host.
Note
Filters apply to the host state and shards at the time of metric collection.
Do one of the following:
Filter by host state:
Expand the Filter by Hosts drop-down menu.
Click the Select Primaries or Select Secondaries checkbox.
Filter by shard:
Specify a shard in the Filter by Hosts search box.
Select a shard from the Filter by Hosts drop-down menu.
Filter by hosts:
Specify hosts in the Filter by Hosts search box.
Select hosts from the Filter by Hosts drop-down menu.
View Chart Metrics
You can view different metrics and operations.
To adjust the metrics and operation types:
Select the metrics to display.
Select one of the following metrics:
Metric | Description |
---|---|
Total latency | Rate that indicates the total combined server operation
duration on a collection (total combined server operation
duration / collection interval in seconds). |
Average latency | Total server operation duration divided by the total
server operation count. |
P50 latency | 50th percentile in the latency histogram. |
P95 latency | 95th percentile in the latency histogram. |
P99 latency | 99th percentile in the latency histogram. |
Operation count | Rate that indicates the total number of server operations
performed on a collection (total server operations / collection
interval) |
Manage Pinned Namespaces from the Dialog
You can search and pin a maximum of five namespaces to the top of the table from the Pinned Namespace dialog.
To manage pinned namespaces from the dialog:
Manage Pinned Namespaces from the Table
You can search and pin a maximum of five namespaces to the top of the table from the table.
To manage pinned namespaces from the table:
Select Namespaces to Chart
MongoDB Atlas displays up to five namespaces. It displays pinned namespaces (if any) and then top namespaces with the highest total latency by default. You can also manually select the namespaces to chart.
To select namespaces:
Edit Columns
Cloud Manager displays the following table columns by default for pinned namespaces (if any) and top namespaces:
Total latency for all operation types
Average latency for all operation types
P95 latency for all operation types
Operation Count for all operation types
To adjust the metric and operation type columns:
Go to a Collection
You can go to a collection in the Data Explorer the from the table.
To go to a collection: