Module io.helidon.metrics.api
Package io.helidon.metrics.api
Class MetricsConfig.BuilderBase<BUILDER extends MetricsConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends MetricsConfig>
java.lang.Object
io.helidon.metrics.api.MetricsConfig.BuilderBase<BUILDER,PROTOTYPE>
- Type Parameters:
BUILDER
- type of the builder extending this abstract builderPROTOTYPE
- type of the prototype interface that would be built byPrototype.Builder.buildPrototype()
- All Implemented Interfaces:
Prototype.Builder<BUILDER,
,PROTOTYPE> Prototype.ConfiguredBuilder<BUILDER,
PROTOTYPE>
- Direct Known Subclasses:
MetricsConfig.Builder
- Enclosing interface:
MetricsConfig
public abstract static class MetricsConfig.BuilderBase<BUILDER extends MetricsConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends MetricsConfig>
extends Object
implements Prototype.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
MetricsConfig
.-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
Generated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionHints for role names the user is expected to be in.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.Clear existing value of this property.Clear existing value of this property.config()
If this instance was configured, this would be the config instance used.Update builder from configuration (node of this type).boolean
enabled()
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.Deprecated, for removal: This API element is subject to removal in a future version.Provided for backward compatibility only; no replacementgcTimeType
(GcTimeType gcTimeType) Deprecated, for removal: This API element is subject to removal in a future version.Provided for backward compatibility only; no replacementKey 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.boolean
Whether to allow anybody to access the endpoint.permitAll
(boolean permitAll) Whether to allow anybody to access the endpoint.protected void
Handles providers and decorators.boolean
Whether automatic REST request metrics should be measured.restRequestEnabled
(boolean restRequestEnabled) Whether automatic REST request metrics should be measured.roles()
Hints for role names the user is expected to be in.Hints for role names the user is expected to be in.scoping()
Settings related to scoping management.scoping
(ScopingConfig scoping) Settings related to scoping management.scoping
(Consumer<ScopingConfig.Builder> consumer) Settings related to scoping management.scoping
(Supplier<? extends ScopingConfig> supplier) Settings related to scoping management.tags()
Global tags.Global tags.toString()
protected void
Validates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
Methods inherited from interface io.helidon.builder.api.Prototype.ConfiguredBuilder
discoverService, discoverServices
-
Constructor Details
-
BuilderBase
protected BuilderBase()Protected to support extensibility.
-
-
Method Details
-
from
Update this builder from an existing prototype instance. This method disables automatic service discovery.- Parameters:
prototype
- existing prototype to update this builder from- Returns:
- updated builder instance
-
from
Update this builder from an existing prototype builder instance.- Parameters:
builder
- existing builder prototype to update this builder from- Returns:
- updated builder instance
-
config
Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
config
in interfacePrototype.ConfiguredBuilder<BUILDER extends MetricsConfig.BuilderBase<BUILDER,
PROTOTYPE>, PROTOTYPE extends MetricsConfig> - Parameters:
config
- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
enabled
Whether metrics functionality is enabled.- Parameters:
enabled
- if metrics are configured to be enabled- Returns:
- updated builder instance
- See Also:
-
permitAll
Whether to allow anybody to access the endpoint.- Parameters:
permitAll
- whether to permit access to metrics endpoint to anybody, defaults totrue
- Returns:
- updated builder instance
- See Also:
-
roles
Hints for role names the user is expected to be in.- Parameters:
roles
- list of hints- Returns:
- updated builder instance
- See Also:
-
addRoles
Hints for role names the user is expected to be in.- Parameters:
roles
- list of hints- Returns:
- updated builder instance
- See Also:
-
keyPerformanceIndicatorMetricsConfig
public BUILDER keyPerformanceIndicatorMetricsConfig(KeyPerformanceIndicatorMetricsConfig keyPerformanceIndicatorMetricsConfig) Key performance indicator metrics settings.- Parameters:
keyPerformanceIndicatorMetricsConfig
- key performance indicator metrics settings- Returns:
- updated builder instance
- See Also:
-
keyPerformanceIndicatorMetricsConfig
public BUILDER keyPerformanceIndicatorMetricsConfig(Consumer<KeyPerformanceIndicatorMetricsConfig.Builder> consumer) Key performance indicator metrics settings.- Parameters:
consumer
- consumer of builder for key performance indicator metrics settings- Returns:
- updated builder instance
- See Also:
-
keyPerformanceIndicatorMetricsConfig
public BUILDER keyPerformanceIndicatorMetricsConfig(Supplier<? extends KeyPerformanceIndicatorMetricsConfig> supplier) Key performance indicator metrics settings.- Parameters:
supplier
- supplier of key performance indicator metrics settings- Returns:
- updated builder instance
- See Also:
-
tags
Global tags.- Parameters:
tags
- name/value pairs for global tags- Returns:
- updated builder instance
- See Also:
-
addTags
Global tags.- Parameters:
tags
- name/value pairs for global tags- Returns:
- updated builder instance
- See Also:
-
clearAppName
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
appName
Value for the application tag to be added to each meter ID.- Parameters:
appName
- application tag value- Returns:
- updated builder instance
- See Also:
-
clearAppTagName
Clear existing value of this property.- Returns:
- updated builder instance
- See Also:
-
appTagName
Name for the application tag to be added to each meter ID.- Parameters:
appTagName
- application tag name- Returns:
- updated builder instance
- See Also:
-
scoping
Settings related to scoping management.- Parameters:
scoping
- scoping settings- Returns:
- updated builder instance
- See Also:
-
scoping
Settings related to scoping management.- Parameters:
consumer
- consumer of builder for scoping settings- Returns:
- updated builder instance
- See Also:
-
scoping
Settings related to scoping management.- Parameters:
supplier
- supplier of scoping settings- Returns:
- updated builder instance
- See Also:
-
restRequestEnabled
Whether automatic REST request metrics should be measured.- Parameters:
restRequestEnabled
- true/false- Returns:
- updated builder instance
- See Also:
-
gcTimeType
Deprecated, for removal: This API element is subject to removal in a future version.Provided for backward compatibility only; no replacementWhether thegc.time
meter should be registered as a gauge (vs. a counter). Thegc.time
meter is inspired by the MicroProfile Metrics spec, in which the meter was originally checked to be a counter but starting in 5.1 was checked be a gauge. For the duration of Helidon 4.x users can choose which type of meter Helidon registers forgc.time
.- Parameters:
gcTimeType
- the type of meter to use for registeringgc.time
- Returns:
- updated builder instance
- See Also:
-
enabled
public boolean enabled()Whether metrics functionality is enabled.- Returns:
- the enabled
-
permitAll
public boolean permitAll()Whether to allow anybody to access the endpoint.- Returns:
- the permit all
- See Also:
-
roles
Hints for role names the user is expected to be in.- Returns:
- the roles
-
keyPerformanceIndicatorMetricsConfig
Key performance indicator metrics settings.- Returns:
- the key performance indicator metrics config
-
tags
Global tags.- Returns:
- the tags
-
appName
Value for the application tag to be added to each meter ID.- Returns:
- the app name
-
appTagName
Name for the application tag to be added to each meter ID.- Returns:
- the app tag name
-
scoping
Settings related to scoping management.- Returns:
- the scoping
-
restRequestEnabled
public boolean restRequestEnabled()Whether automatic REST request metrics should be measured.- Returns:
- the rest request enabled
-
gcTimeType
Deprecated, for removal: This API element is subject to removal in a future version.Provided for backward compatibility only; no replacementWhether thegc.time
meter should be registered as a gauge (vs. a counter). Thegc.time
meter is inspired by the MicroProfile Metrics spec, in which the meter was originally checked to be a counter but starting in 5.1 was checked be a gauge. For the duration of Helidon 4.x users can choose which type of meter Helidon registers forgc.time
.- Returns:
- the gc time type
-
config
If this instance was configured, this would be the config instance used.- Returns:
- config node used to configure this builder, or empty if not configured
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties.
-