Skip to content

Metrics Analysis


After data is collected through Data Collection and reported to a workspace, you can query and analyze metrics and other data types on the Metrics > Metrics Analysis page.

Query Modes

Metrics Analysis supports four query modes:

  • Simple Query: visually select a measurement, metric, and aggregation method
  • Expression Query: perform secondary calculations based on simple query results
  • PromQL Query: enter a native Prometheus query statement
  • Data Source Query: select a data source connected through DataFlux Func or a directly connected TiDB Cloud Lake data source, and use the corresponding native query statement

For more information, refer to Chart Query.

You can view query results in four visualization modes:

Table Chart

Table Chart mode supports four display types:

  1. Time Series Mode
  2. Grouped Mode
  3. Query Tool
  4. Prom: returns only PromQL query results

In the first three display modes, query results return at most 2,000 records by default. To adjust the number of returned records, specify the slimit parameter; up to 10,000 data records can be returned.

In Time Series Mode, you can display query data by selecting different Time Interval options.

The results returned by Query Tool are the same as those in Shortcut > Query Tool. If you add multiple queries and enable status, the result of the first query is returned by default; up to 2,000 records can be exported.

Prom mode supports exporting query results. If a time range is specified in a PromQL query statement, all data in that range is ultimately displayed, regardless of the page Time Widget.

For more information about data querying, refer to Chart Query and Query Tool.

Query History

Through the Query History entry, you can view query data from the past week, including query statements and corresponding times.

Independent Chart

Note

When there is only one query statement, the Independent Chart switch is automatically hidden.

When you add multiple queries and their query result units are inconsistent, you can enable Independent Chart mode. As shown below:

  • Before enabling Independent Chart:

  • After enabling Independent Chart:

Manage Queries

You can manage the Metrics Analysis page through the following operations.

Query Return Limit

When querying raw data, too many returned data points can easily cause charts such as line charts and area charts to load slowly, affecting the user experience.

In this case, you can specify that each query returns the largest or smallest number of sorted data series (20/50/100/500). The system sorts by the last value of each series within the query time range and returns the Top N or Bottom N results. For example, to filter the Top 5 from 20 series, it returns the 5 series with the largest value at the last point.

Note
  • This setting applies only to area charts, line charts, and bar charts.
  • If slimit is declared in the query statement, the slimit in the query statement takes precedence.

Cross-Workspace Query

You can run joint queries across multiple workspaces on the current site to obtain a complete metrics view of different businesses or projects on that site for comprehensive analysis and comparison.

Analyze Charts

Click a data point in a chart to view metrics with similar trends, perform drill-down analysis, or view related logs, traces, processes, and other data.

When a JVM chart is grouped by service or runtime instance, click a data point or group and select View Related Profiling to locate the sampling records for that period.

For more information, refer to Analyze Chart.

Data Format

Values in query results support flexible display format settings. You can set the number of decimal places:

  • 0/1/2/3 decimal places
  • Full precision

You can also set whether to display data with thousands separators and scientific notation.

Units

You can configure units for query data for display.

For specific configuration steps, refer to Units.

Legend

The Legend is an auxiliary chart element used to distinguish data by different colors, points, and shapes. You can use the legend button in the upper-right corner of the Explorer to hide the legend or move it to the bottom or right side.

Colors

To better distinguish data trends of different metrics by color, you can click the color settings button in the upper-right corner of the Explorer to customize legend colors.

Export

After completing metrics analysis and obtaining query results, you can click the export button to perform the following operations:

  • Export as a CSV file
  • Export to notes
  • Export to dashboard
  • Copy to clipboard

Time Interval

Time interval refers to the length of time between data points in a time series chart. You can use Time Interval in the upper-right corner of the Explorer to set the time interval to 10 seconds, 20 seconds, 30 seconds, 1 minute, 5 minutes, and 10 minutes.

The Time Widget affects the data display range in Metrics Analysis, so the available time intervals automatically adjust based on the Time Widget range. For example, if you choose to view metric data from the last 15 minutes, you cannot select "1 hour" as the time interval.

Feedback

Is this page helpful?