Class ProcessorMetrics.Builder

java.lang.Object
io.micrometer.core.instrument.binder.system.ProcessorMetrics.Builder
Enclosing class:
ProcessorMetrics

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

    • extraTags

      public ProcessorMetrics.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
    • cpuTimeConvention

      public ProcessorMetrics.Builder cpuTimeConvention(JvmCpuTimeMeterConvention convention)
      Custom convention for the CPU time meter.
      Parameters:
      convention - the convention to use
      Returns:
      this builder
    • cpuCountConvention

      public ProcessorMetrics.Builder cpuCountConvention(JvmCpuCountMeterConvention convention)
      Custom convention for the CPU count meter.
      Parameters:
      convention - the convention to use
      Returns:
      this builder
    • cpuLoadConvention

      public ProcessorMetrics.Builder cpuLoadConvention(JvmCpuLoadMeterConvention convention)
      Custom convention for the process CPU load meter.
      Parameters:
      convention - the convention to use
      Returns:
      this builder
    • openTelemetryConventions

      public ProcessorMetrics.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 ProcessorMetrics build()
      Build a new ProcessorMetrics instance.
      Returns:
      a new ProcessorMetrics