Monitor Talos APIs¶
Talos provides a comprehensive metrics monitoring system that can be accessed via the /metric
endpoint. This system offers two types of metrics: Summary and Histogram. Below is a detailed explanation of how to configure and use these metrics.
Enabling the metrics¶
Summary¶
Summary metrics provide a statistical summary of the data, including configurable percentiles. In your config.yaml
file, you can define summary metrics as follows:
- type: Specifies that the metric type is a summary.
- percentiles: A list of percentiles to calculate for the summary metrics. These percentiles help you understand the distribution of your data.
Histogram¶
Histogram metrics provide a distribution of data across predefined buckets. In your config.yaml
file, you can define histogram metrics as follows:
Explanation
- type: Specifies that the metric type is a histogram.
- buckets: A list of bucket boundaries for the histogram. These buckets define the range of values for the histogram bins.
Viewing metrics¶
After configuring your metrics in config.yaml
, you can view the metrics by accessing the /metric
endpoint in your browser or via a tool like curl
:
This endpoint will display the metrics in a readable format, showing the statistical summaries or histograms based on your configuration.