graph LR
Metric_Collection_Processing["Metric Collection & Processing"]
Metrics_Visualization["Metrics Visualization"]
Metric_Collection_Processing -- "produces metrics for" --> Metrics_Visualization
Metrics_Visualization -- "visualizes metrics from" --> Metric_Collection_Processing
The LiveKit project's metric subsystem is primarily composed of two high-level components: Metric Collection & Processing and Metrics Visualization. The Metric Collection & Processing component, residing in the pkg/metric directory, is responsible for the entire lifecycle of metric data, from definition and collection to initial aggregation and processing. This foundational layer ensures that all operational data, such as server health, performance, and media quality, is accurately generated. The processed metrics are then consumed by the Metrics Visualization component, which leverages Grafana configurations located in deploy/grafana. This component provides interactive dashboards and visualizations, enabling real-time operational insights, trend analysis, and efficient debugging of the LiveKit platform by presenting the collected and processed data in an accessible format.
This component, implemented within the pkg/metric package, is responsible for the comprehensive definition, collection, aggregation, and initial processing of various real-time metrics across the entire LiveKit platform. It serves as the foundational layer for generating all operational data, including server health, performance, media quality, and API usage.
Related Classes/Methods:
pkg/metric/metric_config.gopkg/metric/metric_timestamper.gopkg/metric/metrics_collector.gopkg/metric/metrics_reporter.go
This component, represented by the deploy/grafana configuration and deployment, is responsible for consuming the processed metrics from the Metric Collection & Processing component. It provides interactive dashboards and visualizations, enabling real-time operational insights, trend analysis, and efficient debugging of the LiveKit platform.
Related Classes/Methods: