Micrometer
Browse implementations
Note
Micrometer provides a static global registry. This registry is used as default if no registry is given in action's inputs.
Counter🔗
Use this action to report a count metric.
Required | Name | Type | Description |
---|---|---|---|
if counter is null |
name |
String | Counter name. |
if name is null |
counter |
Counter | Counter instance. |
description |
String | Counter description | |
unit |
String | Count unit | |
tags |
List<String> | key,value list representing tags. A tag is a Key/value pair representing a dimension of a meter used to classify and drill into measurements. | |
registry |
MeterRegistry | Creates and manages your application's set of meters | |
* | increment |
Integer as String | Positive number by which the counter will be incremented. |
Name | Type | Description |
---|---|---|
micrometerCounter |
Counter | The incremented counter |
Example🔗
Gauge🔗
Use this action to report a gauge metric.
Required | Name | Type | Description |
---|---|---|---|
* | name |
String | Gauge name. |
description |
String | Gauge description | |
if gaugeFunction is null |
gaugeObject |
Object | Gauge will return the current value of this object . |
if gaugeObject is null |
gaugeFunction |
String | Gauge function. |
unit |
String | Count unit | |
tags |
List<String> | key,value list representing tags. A tag is a Key/value pair representing a dimension of a meter used to classify and drill into measurements. | |
registry |
MeterRegistry | Creates and manages your application's set of meters | |
strongReference |
Boolean | Indicates that the gauge should maintain a strong reference on the object upon which its instantaneous value is determined. Default is False |
Info
- GaugeObject is required and must be a Number, a Collection or a Map if no gaugeFunction supplied.
- If gaugeFunction is null and gaugeObject is:
- a number: the gauge will return it's value.
- a collection: the gauge will return it's size.
- a Map: the gauge will return it's size.
- If gaugeObject and gaugeFunction are not null: the gauge call gaugeFunction of gaugeObject and return the result value.
- If gaugeObject is null, gaugeFunction must be a static function.
- GaugeFunction is required if gaugeObject is null.
- GaugeFunction shouldn't have parameters.
- GaugeFunction should return an
int
,long
,float
,double
or any Number's child class.
Name | Type | Description |
---|---|---|
micrometerGaugeObject |
Object | gaugeObject input |
Example🔗
Supposing that we have class with a static methode that return an int.
Then we can use this function as gaugeFunction:
Timer🔗
Use this action to report a timer metric.
Required | Name | Type | Description |
---|---|---|---|
if timer is null |
name |
String | Timer name. |
description |
String | Timer description | |
tags |
List<String> | key,value list representing tags. A tag is a Key/value pair representing a dimension of a meter used to classify and drill into measurements | |
bufferLength |
Integer as String | Distribution statistic buffer length | |
expiry |
Duration | Distribution statistic expiry | |
maxValue |
Duration | Timer max duration | |
minValue |
Duration | Timer min duration | |
percentilePrecision |
Integer as String | Percentile precision | |
publishPercentilesHistogram |
Boolean | Publish percentile histogram or not | |
percentiles |
String | Comma separated list of doublepercentiles doubles | |
sla |
String | Comma separated list of doublepercentiles doubles | |
if name is null |
timer |
Timer | Timer instance. |
registry |
MeterRegistry | Creates and manages your application's set of meters | |
timeunit |
TimeUnit as String | Time unit | |
record |
Duration | The timer will be updated by the record duration |
Name | Type | Description |
---|---|---|
micrometerTimer |
Timer | The timer |
Example🔗
Timer start🔗
Use this action to start a Timer.Sample.
Required | Name | Type | Description |
---|---|---|---|
registry |
MeterRegistry | Creates and manages your application's set of meters |
Name | Type | Description |
---|---|---|
micrometerTimerSample |
Timer.Sample | The sample |
Example🔗
Timer stop🔗
Use this action to stop a Timer.Sample and record its duration into timer.
Required | Name | Type | Description |
---|---|---|---|
* | sample |
Timer.Sample | The previously started sample |
* | timer |
MeterRegistry | Sample's duration will be recorded into this timer |
timeunit |
TimeUnit as String | Time unit. Default is SECONDS |
Name | Type | Description |
---|---|---|
micrometerTimerSampleDuration |
Duration | The sample recorded duration |
Example🔗
Summary🔗
Use this action to report a distribution summary metric.
Required | Name | Type | Description |
---|---|---|---|
if distributionSummary is null |
name |
String | Distrubution summary name. |
description |
String | Distrubution summary description | |
tags |
List<String> | Key,value list representing tags. A tag is a Key/value pair representing a dimension of a meter used to classify and drill into measurements | |
bufferLength |
Integer as String | Distribution statistic buffer length | |
expiry |
Duration | Distribution statistic expiry | |
maxValue |
Duration | Distrubution max duration | |
minValue |
Duration | Distrubution min duration | |
percentilePrecision |
Integer as String | Percentile precision | |
publishPercentilesHistogram |
Boolean | Publish percentile histogram or not | |
percentiles |
String | Comma separated list of doublepercentiles doubles | |
sla |
String | Comma separated list of doublepercentiles doubles | |
scale |
Double as String | Scale value | |
if name is null |
distributionSummary |
DistributionSummary | Distribution instance. |
registry |
MeterRegistry | Creates and manages your application's set of meters | |
timeunit |
TimeUnit as String | Time unit | |
record |
Double as String | The distribution will be updated by the record value |
Name | Type | Description |
---|---|---|
micrometerSummary |
DistributionSummary | The distribution summary |