public final class MicrometerHolder
extends java.lang.Object
Constructor and Description |
---|
MicrometerHolder(org.springframework.context.ApplicationContext context,
java.lang.String name,
java.lang.String timerName,
java.lang.String timerDesc,
java.util.Map<java.lang.String,java.lang.String> tags)
Create an instance with the provided properties.
|
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Remove the timers.
|
void |
failure(java.lang.Object sample,
java.lang.String exception)
Record failure.
|
java.lang.Object |
start()
Start the timer.
|
void |
success(java.lang.Object sample)
Record success.
|
public MicrometerHolder(@Nullable org.springframework.context.ApplicationContext context, java.lang.String name, java.lang.String timerName, java.lang.String timerDesc, java.util.Map<java.lang.String,java.lang.String> tags)
context
- the application context from which to obtain the meter registry.name
- the value of the 'name' tag.timerName
- the timer name.timerDesc
- the timer description.tags
- additional tags.public java.lang.Object start()
public void success(java.lang.Object sample)
sample
- ths sample.start()
public void failure(java.lang.Object sample, java.lang.String exception)
sample
- the sample.exception
- the exception name.start()
public void destroy()