Class JvmThreadMetrics.Builder

java.lang.Object
io.micrometer.core.instrument.binder.jvm.JvmThreadMetrics.Builder
Enclosing class:
JvmThreadMetrics

public static class JvmThreadMetrics.Builder extends Object
Builder for JvmThreadMetrics.
Since:
1.18.0
  • Method Details

    • extraTags

      public JvmThreadMetrics.Builder extraTags(Iterable<? extends Tag> extraTags)
      Extra tags to add to meters registered by this binder. If a conflict occurs between extra tags and convention tags, the convention tag takes precedence.
      Parameters:
      extraTags - tags to add
      Returns:
      this builder
    • threadCountConvention

      public JvmThreadMetrics.Builder threadCountConvention(JvmThreadCountMeterConvention convention)
      Custom convention for the thread count meter.
      Parameters:
      convention - the convention to use
      Returns:
      this builder
    • openTelemetryConventions

      public JvmThreadMetrics.Builder openTelemetryConventions()
      Use OpenTelemetry semantic conventions for applicable meters that have a stable semantic convention as of the version documented in the otel conventions package. Individual conventions can still be overridden by calling the specific convention methods after this one.

      In future minor releases, this method may configure additional conventions as new OpenTelemetry semantic conventions for this binder become stable. If strict metric stability across library upgrades is required, configure individual conventions explicitly instead of using this convenience method.

      Returns:
      this builder
      See Also:
    • build

      public JvmThreadMetrics build()
      Build a new JvmThreadMetrics instance.
      Returns:
      a new JvmThreadMetrics