An Extensive Examination of the Four Prometheus Metric Types

Greetings and thanks for joining us as we kick out our metrics series. The four categories of Prometheus metrics were thoroughly studied in the first article; the operation of metrics in OpenTelemetry was discussed in the second; and finally, the two articles were combined in the third to discuss the distinctions, parallels, and overlaps between the metrics used in the two systems.

Sadly, we have chosen to discontinue Promscale support in February 2023; nevertheless, some of the content on this page could still be applicable. For answers, go through these and other FAQs.

Through the use of metrics, many characteristics of software, including its productivity, consumption, and performance, may be monitored and assessed. Through alerts and dashboards, they enable engineers to track the progression of several indicators (such as CPU and memory utilisation, request latency, and so forth). The use of metrics in IT monitoring has a long history. Together with other data sources like logs and traces, engineers utilise them to identify instances in which systems deviate from anticipated behaviour. You will need to know about the four primary prometheus metrics there.

A metric data point consists of the following components, in general:

Symbol denoting SI ounces

We have seen an increase in system complexity over the last ten years, which has led to the creation of dimensional metrics. Dimensional metrics are those that include a set of tags or labels (sometimes referred to as the dimensions) in order to provide more context. Monitors that enable dimensional metrics make it simple for engineers to gather and assess statistics across several components and dimensions. This may be accomplished by running a name-based query in addition to label-based data filtering and grouping.

Because Prometheus provides a remote writing interface and a framework for metric exposition, the community and several businesses have accepted it as the standard for exposing and gathering metrics. You’re probably thinking which set of criteria might work best for you, given the possibilities available to you. We aim to address this issue and others by delving deeply into the CNCF-maintained metric standards in a three-part blog post series.

Metrics developed by Prometheus

Above all, the most important. Using the presenting structure in Prometheus, the following four categories of metrics may be gathered:

It displays a data histogram.

To put it simply, Prometheus scrapes HTTP endpoints that give metrics in order to get this data using a pull method. To put it another way, Prometheus retrieves the data. The monitored component may provide these endpoints natively, or they may be supplied via hundreds of Prometheus exporters built by the community. Prometheus offers client libraries that may be used to instrument your own applications in many different languages.

Conclusion

Finding the endpoints of the metrics that need to be scraped and gaining access to them might be challenging due to the network security measures in place. Metrics in the OpenMetrics and exposition-style formats may be scraped using Prometheus. Metrics may be retrieved via HTTP using either the more dependable and efficient protocol buffer format or the more popular and widely supported textual format. Since the text format is accessible by humans, you may use a tool like curl or your web browser to see the most recent publicly available stats. This is one of the text format’s primary benefits.

About John Smith

John Smith: John, a former software engineer, shares his insights on software development, programming languages, and coding best practices.
View all posts by John Smith →