Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions prometheus_client/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,23 @@ def _samples(self):

@_MetricWrapper
class Gauge(object):
'''Gauge metric, to report instantaneous values.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blank line after the one-line summary


Examples of Gauges include:
Inprogress requests
Number of items in a queue
Free memory
Total memory
Temperature

Gauges can go both up and down.

from prometheus_client import Gauge
g = Gauge('my_inprogress_requests', 'Description of gauge')
g.inc() # Increment by 1
g.dec(10) # Decrement by given value
g.set(4.2) # Set to a given value
'''
_type = 'gauge'
_reserved_labelnames = []

Expand Down