Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
docs
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
docs
Commits
8780db9d
Commit
8780db9d
authored
Dec 19, 2014
by
Julius Volz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add metric type documentation.
parent
b9550585
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
1 deletion
+79
-1
automatic.md
content/concepts/automatic.md
+1
-1
metric_types.md
content/concepts/metric_types.md
+78
-0
No files found.
content/concepts/automatic.md
View file @
8780db9d
---
title
:
Automatic Labels and Synthetic Metrics
sort_rank
:
5
sort_rank
:
2
---
# Automatic Labels and Synthetic Metrics
...
...
content/concepts/metric_types.md
View file @
8780db9d
---
title
:
Metric Types
sort_rank
:
1
---
# Metric Types
Prometheus offers three core metric types:
*
Counters
*
Gauges
*
Summaries
Each type is useful for a different purpose, so it is important to use the
right one for the right job.
Metric types are currently only differentiated in the client libraries (to
enable APIs tailored to the usage of the specific types) and in the wire
protocol. The Prometheus server does not yet persist and make use of the type
information after ingesting samples. This may change in the future, however.
## Counter
A _counter_ is a cumulative metric that represents a single numerical value
that only ever goes up. That implies that it cannot be used to count items
whose number can also go down, e.g. the number of currently running goroutines.
Those "counts" are represented by gauges.
A counter is typically used to count requests served, tasks completed, errors
occurred, etc.
Client library usage documentation for counters:
*
[
Go
](
http://godoc.org/github.com/prometheus/client_golang/prometheus#Counter
)
*
[
Java
](
https://github.com/prometheus/client_java/blob/master/client/src/main/java/io/prometheus/client/metrics/Counter.java
)
*
[
Java (simple client)
](
https://github.com/prometheus/client_java/blob/master/simpleclient/src/main/java/io/prometheus/client/Counter.java
)
*
[
Ruby
](
https://github.com/prometheus/client_ruby#counter
)
## Gauge
A _gauge_ is a metric that represents a single numerical value that can
arbitrarily go up and down.
Gauges are typically used for measured values like temperatures or current
memory usage, but also "counts" that can go up and down, like the number of
running goroutines.
Client library usage documentation for gauges:
*
[
Go
](
http://godoc.org/github.com/prometheus/client_golang/prometheus#Gauge
)
*
[
Java
](
https://github.com/prometheus/client_java/blob/master/client/src/main/java/io/prometheus/client/metrics/Gauge.java
)
*
[
Java (simple client)
](
https://github.com/prometheus/client_java/blob/master/simpleclient/src/main/java/io/prometheus/client/Gauge.java
)
*
[
Ruby
](
https://github.com/prometheus/client_ruby#gauge
)
## Summaries
A _summary_ samples observations (usually things like request durations) over
sliding windows of time and provides instantaneous insight into their
distributions, frequencies, and sums.
A summary reports the following information:
*
streaming
**quantile values**
of observed events, exposed as
`<basename>{quantile="<quantile label>"}`
*
the
**total sum**
of all observed values, exposed as
`<basename>_sum`
*
the
**count**
of events that have been observed, exposed as
`<basename>_count`
This is quite convenient, for if you are interested in tracking latencies of an
operation in real time, you get three types of information reported for free
with one metric.
A typical use-case is the observation of request latencies or response sizes.
Client library usage documentation for summaries:
*
[
Go
](
http://godoc.org/github.com/prometheus/client_golang/prometheus#Summary
)
*
[
Java
](
https://github.com/prometheus/client_java/blob/master/client/src/main/java/io/prometheus/client/metrics/Summary.java
)
*
[
Java (simple client)
](
https://github.com/prometheus/client_java/blob/master/simpleclient/src/main/java/io/prometheus/client/Summary.java
)
*
[
Ruby
](
https://github.com/prometheus/client_ruby#summary
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment