Package io.micrometer.core.instrument
Class LongTaskTimer.Builder
java.lang.Object
io.micrometer.core.instrument.LongTaskTimer.Builder
- Enclosing interface:
- LongTaskTimer
public static class LongTaskTimer.Builder
extends java.lang.Object
Fluent builder for long task timers.
-
Method Summary
Modifier and Type Method Description LongTaskTimer.Builderdescription(java.lang.String description)LongTaskTimerregister(MeterRegistry registry)Add the long task timer to a single registry, or return an existing long task timer in that registry.LongTaskTimer.Buildertag(java.lang.String key, java.lang.String value)LongTaskTimer.Buildertags(java.lang.Iterable<Tag> tags)LongTaskTimer.Buildertags(java.lang.String... tags)
-
Method Details
-
tags
- Parameters:
tags- Must be an even number of arguments representing key/value pairs of tags.- Returns:
- The long task timer builder with added tags.
-
tags
- Parameters:
tags- Tags to add to the eventual long task timer.- Returns:
- The long task timer builder with added tags.
-
tag
- Parameters:
key- The tag key.value- The tag value.- Returns:
- The long task timer builder with a single added tag.
-
description
- Parameters:
description- Description text of the eventual long task timer.- Returns:
- The long task timer builder with added description.
-
register
Add the long task timer to a single registry, or return an existing long task timer in that registry. The returned long task timer will be unique for each registry, but each registry is guaranteed to only create one long task timer for the same combination of name and tags.- Parameters:
registry- A registry to add the long task timer to, if it doesn't already exist.- Returns:
- A new or existing long task timer.
-