Skip to content

Metrics


Metrics are the core data units used in the Guance system for continuously tracking system status. They consist of three parts: numerical values, timestamps, and dimensional tags. They record quantifiable system characteristics (such as resource utilization and business throughput) in time series format, enabling multi-dimensional analysis through tags (e.g., host, service, region). This provides precise data support for real-time monitoring, performance optimization, and trend prediction.


Data Architecture

The metric data processing in Guance is divided into three layers:

  1. Collection Layer: Handled by DataKit (a lightweight agent deployed in the user's environment, analogous to Prometheus Exporters, directly interfacing with data sources, undertaking core responsibilities of collection, preprocessing, and secure transmission). It is responsible for capturing raw metrics from sources such as hosts, applications, and middleware.

  2. Transmission Layer: DataKit encrypts the data and sends it to the Guance data center via HTTP/HTTPS.

  3. Storage and Analysis Layer: Guance cleanses, stores the data, and provides visualization and analysis capabilities.


Metric Data Composition

A complete metric data unit contains three core elements:

Element Description Example
Measurement The classification identifier for the data cpu
Tags Key-value pairs used for data filtering and grouping host=server01, region=cn
Fields Specific numerical metrics usage_user=12.3

For example:

cpu,host=server01,core=0 usage_user=12.3,usage_system=5.7 1690524000000000000
  • Measurement: cpu

  • Tags: host=server01, core=0 (marking the source server and CPU core)

  • Fields: usage_user=12.3 (user space CPU usage), usage_system=5.7 (system space usage)

  • Timestamp: 1690524000000000000 (2023-07-28 12:00:00 UTC)


Core Concepts

Measurement

A Measurement is a collection of similar metrics, containing multiple metrics and tags. For example, the cpu Measurement includes CPU-related metrics such as usage_user, usage_system.

Metric

A Metric reflects the operational state of a system (e.g., CPU usage, page load time). It consists of a metric name (identifier) and a metric value (specific numerical value).

Tag

Attributes of the data point collection object are identified through tags, presented as key-value pairs, consisting of a tag key and a tag value. A data point can carry multiple tags, used for data filtering and grouping.

Time Series

A Time Series is uniquely determined by the metric name + tag combination. Within the same time series, metric values (fields) are arranged in chronological order by timestamp to form a sequence.

The number of time series depends on the number of combinations of metric names and tags. Each additional distinct value for a tag multiplies the number of combinations. Excessive tag values can lead to time series inflation, directly impacting storage costs and query performance. It is recommended to reasonably control the use of high-cardinality tags (e.g., user ID, request path).

Field

A Field is a specific numerical metric, such as usage=58.3. Metric values change over time, forming time series data.


Data Visualization

Metric data is visualized in the following forms:

  • Metric Analysis: Perform metric queries and analysis based on various query methods such as DQL and PromQL.
  • Metric Management: Display measurements, metrics, tags, and time series statistics in list form.
  • Visual Charts: Use metric data in Dashboards to create time series charts, bar charts, pie charts, etc.

Getting Started

  • Enable Metric Collection


    Implement metric collection through DataKit, supporting standard collection (built-in collectors) and custom collection (Telegraf, Prometheus, StatsD, etc.)

    View Collection Configuration →

  • Metric Management


    View all reported measurements, manage metrics, tags, time series count statistics, day-over-day comparison, and data storage policies.

    Metric Management →

  • Generate Metrics


    Aggregate and generate new business metrics based on existing data (Logs, APM, RUM, Metrics, Synthetic Tests, Basic Objects, Resource Catalog).

    Generate Metrics →

  • Metric Analysis


    Query, analyze, and visually display metric data based on various query methods such as DQL and PromQL.

    Metric Analysis →


  • Monitor

    Configure alert rules based on metrics to enable automatic notification of anomalies.

    Go to Configure →

  • Dashboard

    Use metric data to create visual charts and build monitoring dashboards.

    Go to Configure →

  • DQL / PromQL

    Use query languages to retrieve metric data, supporting complex analysis scenarios.

    View Syntax →

  • Infrastructure

    View infrastructure metric data, associating resources such as hosts and containers.

    Go to View →

Feedback

Is this page helpful? ×