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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LongTaskTimer.Builder
description(java.lang.String description)
LongTaskTimer
register(MeterRegistry registry)
Add the long task timer to a single registry, or return an existing long task timer in that registry.LongTaskTimer.Builder
tag(java.lang.String key, java.lang.String value)
LongTaskTimer.Builder
tags(java.lang.Iterable<Tag> tags)
LongTaskTimer.Builder
tags(java.lang.String... tags)
-
-
-
Method Detail
-
tags
public LongTaskTimer.Builder tags(java.lang.String... 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
public LongTaskTimer.Builder tags(java.lang.Iterable<Tag> tags)
- Parameters:
tags
- Tags to add to the eventual long task timer.- Returns:
- The long task timer builder with added tags.
-
tag
public LongTaskTimer.Builder tag(java.lang.String key, java.lang.String value)
- Parameters:
key
- The tag key.value
- The tag value.- Returns:
- The long task timer builder with a single added tag.
-
description
public LongTaskTimer.Builder description(@Nullable java.lang.String description)
- Parameters:
description
- Description text of the eventual long task timer.- Returns:
- The long task timer builder with added description.
-
register
public LongTaskTimer register(MeterRegistry registry)
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.
-
-