Class MetricsConfig.Builder
java.lang.Object
io.helidon.metrics.api.MetricsConfig.BuilderBase<MetricsConfig.Builder, MetricsConfig>
io.helidon.metrics.api.MetricsConfig.Builder
- All Implemented Interfaces:
Prototype.Builder<MetricsConfig.Builder, MetricsConfig>, Builder<MetricsConfig.Builder, MetricsConfig>, ConfigBuilderSupport.ConfiguredBuilder<MetricsConfig.Builder, MetricsConfig>, Supplier<MetricsConfig>
- Enclosing interface:
MetricsConfig
public static class MetricsConfig.Builder
extends MetricsConfig.BuilderBase<MetricsConfig.Builder, MetricsConfig>
implements Builder<MetricsConfig.Builder, MetricsConfig>
Fluent API builder for
MetricsConfig.-
Nested Class Summary
Nested classes/interfaces inherited from class MetricsConfig.BuilderBase
MetricsConfig.BuilderBase.MetricsConfigImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create an instance from this builder.Create an instance of the prototype.Methods inherited from class MetricsConfig.BuilderBase
addPublisher, addPublishers, addRoles, addTags, appName, appName, appTagName, appTagName, builtInMeterNameFormat, builtInMeterNameFormat, clearAppName, clearAppTagName, clearJsonUnitsDefault, clearPublishers, clearRoles, clearTags, config, config, enabled, enabled, from, from, jsonUnitsDefault, jsonUnitsDefault, keyPerformanceIndicatorMetricsConfig, keyPerformanceIndicatorMetricsConfig, keyPerformanceIndicatorMetricsConfig, keyPerformanceIndicatorMetricsConfig, permitAll, permitAll, preBuildPrototype, publishers, publishers, publishersDiscoverServices, publishersDiscoverServices, restRequestEnabled, restRequestEnabled, roles, roles, scoping, scoping, scoping, scoping, tags, tags, toString, validatePrototype, virtualThreadsEnabled, virtualThreadsEnabled, virtualThreadsPinnedThreshold, virtualThreadsPinnedThreshold, warnOnMultipleRegistries, warnOnMultipleRegistriesModifier and TypeMethodDescriptionaddPublisher(MetricsPublisher publisher) Metrics publishers which make the metrics data available to external systems.addPublishers(List<? extends MetricsPublisher> publishers) Metrics publishers which make the metrics data available to external systems.Role names allowed to access the metrics endpoint when this config is used by a metrics observer andMetricsConfig.BuilderBase.permitAll()isfalse.Global tags.appName()Value for the application tag to be added to each meter ID.Value for the application tag to be added to each meter ID.Name for the application tag to be added to each meter ID.appTagName(String appTagName) Name for the application tag to be added to each meter ID.Output format for built-in meter names.builtInMeterNameFormat(BuiltInMeterNameFormat builtInMeterNameFormat) Output format for built-in meter names.Clear existing value of appName.Clear existing value of appTagName.Clear existing value of jsonUnitsDefault.Clear all publishers.Clear all roles.Clear all tags.config()Metrics configuration node.Update builder from configuration (node of this type).booleanenabled()Whether metrics functionality is enabled.enabled(boolean enabled) Whether metrics functionality is enabled.from(MetricsConfig prototype) Update this builder from an existing prototype instance.from(MetricsConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.Default units for timer output in JSON if not specified on a given timer.jsonUnitsDefault(TimeUnit jsonUnitsDefault) Default units for timer output in JSON if not specified on a given timer.Key performance indicator metrics settings.keyPerformanceIndicatorMetricsConfig(KeyPerformanceIndicatorMetricsConfig keyPerformanceIndicatorMetricsConfig) Key performance indicator metrics settings.keyPerformanceIndicatorMetricsConfig(Consumer<KeyPerformanceIndicatorMetricsConfig.Builder> consumer) Key performance indicator metrics settings.keyPerformanceIndicatorMetricsConfig(Supplier<? extends KeyPerformanceIndicatorMetricsConfig> supplier) Key performance indicator metrics settings.booleanWhether to allow anybody to access the metrics endpoint when this config is used by a metrics observer.permitAll(boolean permitAll) Whether to allow anybody to access the metrics endpoint when this config is used by a metrics observer.protected voidHandles providers and decorators.Metrics publishers which make the metrics data available to external systems.publishers(List<? extends MetricsPublisher> publishers) Metrics publishers which make the metrics data available to external systems.booleanService discovery flag forMetricsConfig.BuilderBase.publishers().publishersDiscoverServices(boolean publishersDiscoverServices) Service discovery flag forMetricsConfig.BuilderBase.publishers().booleanWhether automatic REST request metrics should be measured.restRequestEnabled(boolean restRequestEnabled) Whether automatic REST request metrics should be measured.roles()Role names allowed to access the metrics endpoint when this config is used by a metrics observer andMetricsConfig.BuilderBase.permitAll()isfalse.Role names allowed to access the metrics endpoint when this config is used by a metrics observer andMetricsConfig.BuilderBase.permitAll()isfalse.scoping()Deprecated, for removal: This API element is subject to removal in a future version.Core metrics ignores these settings, and this method will be removed.scoping(ScopingConfig scoping) Deprecated, for removal: This API element is subject to removal in a future version.Core metrics ignores these settings, and this method will be removed.scoping(Consumer<ScopingConfig.Builder> consumer) Deprecated, for removal: This API element is subject to removal in a future version.Core metrics ignores these settings, and this method will be removed.scoping(Supplier<? extends ScopingConfig> supplier) Deprecated, for removal: This API element is subject to removal in a future version.Core metrics ignores these settings, and this method will be removed.tags()Global tags.Global tags.toString()protected voidValidates required properties.booleanWhether Helidon should expose meters related to virtual threads.virtualThreadsEnabled(boolean virtualThreadsEnabled) Whether Helidon should expose meters related to virtual threads.Threshold for sampling pinned virtual threads to include in the pinned threads meter.virtualThreadsPinnedThreshold(Duration virtualThreadsPinnedThreshold) Threshold for sampling pinned virtual threads to include in the pinned threads meter.booleanWhether to log warnings when multiple registries are created.warnOnMultipleRegistries(boolean warnOnMultipleRegistries) Whether to log warnings when multiple registries are created.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault MetricsConfigget()default MetricsConfig.Builderidentity()Instance of this builder as the correct type.default MetricsConfig.Builderupdate(Consumer<MetricsConfig.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface Prototype.Builder
selfModifier and TypeMethodDescriptiondefault MetricsConfig.Builderself()Instance of this builder as the correct type.
-
Method Details
-
buildPrototype
Create an instance of the prototype. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildPrototypein interfacePrototype.Builder<MetricsConfig.Builder, MetricsConfig>- Returns:
- an instance of the setup object created from this builder
-
build
Create an instance from this builder. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildin interfaceBuilder<MetricsConfig.Builder, MetricsConfig>- Returns:
- instance of the built type
-