Class AutoHttpMetricsConfig.BuilderBase<BUILDER extends AutoHttpMetricsConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends AutoHttpMetricsConfig>
java.lang.Object
io.helidon.webserver.observe.metrics.AutoHttpMetricsConfig.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> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,,PROTOTYPE> ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
- Direct Known Subclasses:
AutoHttpMetricsConfig.Builder
- Enclosing interface:
AutoHttpMetricsConfig
public abstract static class AutoHttpMetricsConfig.BuilderBase<BUILDER extends AutoHttpMetricsConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends AutoHttpMetricsConfig>
extends Object
implements ConfigBuilderSupport.ConfiguredBuilder<BUILDER,PROTOTYPE>
Fluent API builder base for
AutoHttpMetricsConfig.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionElective attribute for which to opt in.Automatic metrics collection settings.addPath(Consumer<AutoHttpMetricsPathConfig.Builder> consumer) Automatic metrics collection settings.addPaths(List<? extends AutoHttpMetricsPathConfig> paths) Automatic metrics collection settings.addSockets(Set<String> sockets) Socket names for sockets to be instrumented with automatic metrics.Clear all optIn.Clear all paths.Clear all sockets.config()Configuration used to configure this instance.Deprecated.Update builder from configuration (node of this type).booleanenabled()Whether automatic metrics collection as a whole is enabled.enabled(boolean enabled) Whether automatic metrics collection as a whole is enabled.from(AutoHttpMetricsConfig prototype) Update this builder from an existing prototype instance.from(AutoHttpMetricsConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.optIn()Elective attribute for which to opt in.Elective attribute for which to opt in.paths()Automatic metrics collection settings.paths(List<? extends AutoHttpMetricsPathConfig> paths) Automatic metrics collection settings.protected voidHandles providers and decorators.sockets()Socket names for sockets to be instrumented with automatic metrics.Socket names for sockets to be instrumented with automatic metrics.toString()protected voidValidates required properties.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.helidon.builder.api.Prototype.Builder
buildPrototype, self
-
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
Deprecated.Update builder from configuration (node of this type). If a value is present in configuration, it would override currently configured values.- Specified by:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends AutoHttpMetricsConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends AutoHttpMetricsConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- 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:
configin interfaceConfigBuilderSupport.ConfiguredBuilder<BUILDER extends AutoHttpMetricsConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends AutoHttpMetricsConfig> - Parameters:
config- configuration instance used to obtain values to update this builder- Returns:
- updated builder instance
-
enabled
Whether automatic metrics collection as a whole is enabled.- Parameters:
enabled- automatic metrics collection enabled- Returns:
- updated builder instance
- See Also:
-
clearSockets
Clear all sockets.- Returns:
- updated builder instance
- See Also:
-
sockets
Socket names for sockets to be instrumented with automatic metrics. Defaults to all sockets.- Parameters:
sockets- socket names- Returns:
- updated builder instance
- See Also:
-
addSockets
Socket names for sockets to be instrumented with automatic metrics. Defaults to all sockets.- Parameters:
sockets- socket names- Returns:
- updated builder instance
- See Also:
-
clearPaths
Clear all paths.- Returns:
- updated builder instance
- See Also:
-
paths
Automatic metrics collection settings. Default excludes built-in Helidon paths (e.g., metrics, health). A request's path and HTTP method are checked against each entry underpathsin order.- If a request matches no entry, then the request is measured.
- If a request matches multiple entries, then the first match wins.
- Parameters:
paths- automatic metrics collection settings- Returns:
- updated builder instance
- See Also:
-
addPaths
Automatic metrics collection settings. Default excludes built-in Helidon paths (e.g., metrics, health). A request's path and HTTP method are checked against each entry underpathsin order.- If a request matches no entry, then the request is measured.
- If a request matches multiple entries, then the first match wins.
- Parameters:
paths- automatic metrics collection settings- Returns:
- updated builder instance
- See Also:
-
addPath
Automatic metrics collection settings. Default excludes built-in Helidon paths (e.g., metrics, health). A request's path and HTTP method are checked against each entry underpathsin order.- If a request matches no entry, then the request is measured.
- If a request matches multiple entries, then the first match wins.
- Parameters:
path- add single automatic metrics collection settings- Returns:
- updated builder instance
- See Also:
-
addPath
Automatic metrics collection settings. Default excludes built-in Helidon paths (e.g., metrics, health). A request's path and HTTP method are checked against each entry underpathsin order.- If a request matches no entry, then the request is measured.
- If a request matches multiple entries, then the first match wins.
- Parameters:
consumer- consumer of builder for automatic metrics collection settings- Returns:
- updated builder instance
- See Also:
-
clearOptIn
Clear all optIn.- Returns:
- updated builder instance
- See Also:
-
optIn
Elective attribute for which to opt in. Each string in the list is of the formmeter-name:attribute-namewheremeter-nameis the name of the meter andattribute-nameis the name of an attribute (tag) which is optional on that meter.- Parameters:
optIn- opt-in attributes to be provided- Returns:
- updated builder instance
- See Also:
-
addOptIn
Elective attribute for which to opt in. Each string in the list is of the formmeter-name:attribute-namewheremeter-nameis the name of the meter andattribute-nameis the name of an attribute (tag) which is optional on that meter.- Parameters:
optIn- opt-in attributes to be provided- Returns:
- updated builder instance
- See Also:
-
enabled
public boolean enabled()Whether automatic metrics collection as a whole is enabled.- Returns:
- automatic metrics collection enabled
-
sockets
Socket names for sockets to be instrumented with automatic metrics. Defaults to all sockets.- Returns:
- socket names
-
paths
Automatic metrics collection settings. Default excludes built-in Helidon paths (e.g., metrics, health). A request's path and HTTP method are checked against each entry underpathsin order.- If a request matches no entry, then the request is measured.
- If a request matches multiple entries, then the first match wins.
- Returns:
- automatic metrics collection settings
-
optIn
Elective attribute for which to opt in. Each string in the list is of the formmeter-name:attribute-namewheremeter-nameis the name of the meter andattribute-nameis the name of an attribute (tag) which is optional on that meter.- Returns:
- opt-in attributes to be provided
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties. -
config
Configuration used to configure this instance.- Returns:
- config instance
-
config(io.helidon.config.Config)