Class JvmMemoryMetrics.Builder
java.lang.Object
io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics.Builder
- Enclosing class:
JvmMemoryMetrics
Builder for
JvmMemoryMetrics.- Since:
- 1.18.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a newJvmMemoryMetricsinstance.Extra tags to add to meters registered by this binder.Custom convention for the memory committed meter.memoryMaxConvention(JvmMemoryMaxMeterConvention convention) Custom convention for the memory max meter.Custom convention for the memory used after last GC meter.memoryUsedConvention(JvmMemoryUsedMeterConvention convention) Custom convention for the memory used meter.Use OpenTelemetry semantic conventions for applicable meters that have a stable semantic convention as of the version documented inthe otel conventions package.
-
Method Details
-
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
-
memoryUsedConvention
Custom convention for the memory used meter.- Parameters:
convention- the convention to use- Returns:
- this builder
-
memoryCommittedConvention
public JvmMemoryMetrics.Builder memoryCommittedConvention(JvmMemoryCommittedMeterConvention convention) Custom convention for the memory committed meter.- Parameters:
convention- the convention to use- Returns:
- this builder
-
memoryMaxConvention
Custom convention for the memory max meter.- Parameters:
convention- the convention to use- Returns:
- this builder
-
memoryUsedAfterLastGcConvention
public JvmMemoryMetrics.Builder memoryUsedAfterLastGcConvention(JvmMemoryUsedAfterLastGcMeterConvention convention) Custom convention for the memory used after last GC meter.- Parameters:
convention- the convention to use- Returns:
- this builder
-
openTelemetryConventions
Use OpenTelemetry semantic conventions for applicable meters that have a stable semantic convention as of the version documented inthe 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
Build a newJvmMemoryMetricsinstance.- Returns:
- a new
JvmMemoryMetrics
-