Class JvmThreadMetrics.Builder
java.lang.Object
io.micrometer.core.instrument.binder.jvm.JvmThreadMetrics.Builder
- Enclosing class:
JvmThreadMetrics
Builder for
JvmThreadMetrics.- Since:
- 1.18.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Build a newJvmThreadMetricsinstance.Extra tags to add to meters registered by this binder.Use OpenTelemetry semantic conventions for applicable meters that have a stable semantic convention as of the version documented inthe otel conventions package.threadCountConvention(JvmThreadCountMeterConvention convention) Custom convention for the thread count meter.
-
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
-
threadCountConvention
Custom convention for the thread count 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 newJvmThreadMetricsinstance.- Returns:
- a new
JvmThreadMetrics
-