Simple
provide.foundation.metrics.simple
¶
TODO: Add module docstring.
Classes¶
SimpleCounter
¶
Counter metric that increments monotonically.
Source code in provide/foundation/metrics/simple.py
Attributes¶
Functions¶
inc
¶
Increment the counter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
float
|
Amount to increment by (default: 1) |
1
|
**labels
|
Any
|
Label key-value pairs |
{}
|
Source code in provide/foundation/metrics/simple.py
SimpleGauge
¶
Gauge metric that can go up or down.
Source code in provide/foundation/metrics/simple.py
Attributes¶
Functions¶
dec
¶
inc
¶
Increment the gauge value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
float
|
Amount to increment by |
1
|
**labels
|
Any
|
Label key-value pairs |
{}
|
Source code in provide/foundation/metrics/simple.py
set
¶
Set the gauge value.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
float
|
Value to set |
required |
**labels
|
Any
|
Label key-value pairs |
{}
|
Source code in provide/foundation/metrics/simple.py
SimpleHistogram
¶
Histogram metric for recording distributions of values.
Source code in provide/foundation/metrics/simple.py
Attributes¶
Functions¶
observe
¶
Record an observation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
value
|
float
|
Value to observe |
required |
**labels
|
Any
|
Label key-value pairs |
{}
|