Class AutoHttpMetricsConfig.BuilderBase<BUILDER extends AutoHttpMetricsConfig.BuilderBase<BUILDER, PROTOTYPE>, PROTOTYPE extends AutoHttpMetricsConfig>
- 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>
- Direct Known Subclasses:
AutoHttpMetricsConfig.Builder
- Enclosing interface:
AutoHttpMetricsConfig
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 TypeMethodDescriptionaddKnownMethod(String knownMethod) Exact, case-sensitive HTTP methods to be used in the HTTP method tag for automatic metrics, defaulted to the standard HTTP methods; assigning this value fully replaces the set of method names.addKnownMethods(List<String> knownMethods) Exact, case-sensitive HTTP methods to be used in the HTTP method tag for automatic metrics, defaulted to the standard HTTP methods; assigning this value fully replaces the set of method names.Elective 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 knownMethods.Clear all optIn.Clear all paths.Clear all sockets.config()Configuration used to configure this instance.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.Exact, case-sensitive HTTP methods to be used in the HTTP method tag for automatic metrics, defaulted to the standard HTTP methods; assigning this value fully replaces the set of method names.knownMethods(List<String> knownMethods) Exact, case-sensitive HTTP methods to be used in the HTTP method tag for automatic metrics, defaulted to the standard HTTP methods; assigning this value fully replaces the set of method names.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()booleanDeprecated.This option is ignored and will be removed in a future release.useUpdatedHttpMetrics(boolean useUpdatedHttpMetrics) Deprecated.This option is ignored and will be removed in a future release.protected voidValidates required properties.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface 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
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
-
sockets
-
addSockets
-
clearPaths
-
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
-
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:
-
clearKnownMethods
Clear all knownMethods.- Returns:
- updated builder instance
- See Also:
-
knownMethods
Exact, case-sensitive HTTP methods to be used in the HTTP method tag for automatic metrics, defaulted to the standard HTTP methods; assigning this value fully replaces the set of method names.Default known HTTP methods:
CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,QUERY, andTRACE. Unlisted methods are reported as_OTHER, so configurations that add additional method names must also include default methods they intend to retain.Method names are matched exactly. See the OpenTelemetry semantic convention for HTTP request methods.
- Parameters:
knownMethods- known HTTP methods- Returns:
- updated builder instance
- See Also:
-
addKnownMethods
Exact, case-sensitive HTTP methods to be used in the HTTP method tag for automatic metrics, defaulted to the standard HTTP methods; assigning this value fully replaces the set of method names.Default known HTTP methods:
CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,QUERY, andTRACE. Unlisted methods are reported as_OTHER, so configurations that add additional method names must also include default methods they intend to retain.Method names are matched exactly. See the OpenTelemetry semantic convention for HTTP request methods.
- Parameters:
knownMethods- known HTTP methods- Returns:
- updated builder instance
- See Also:
-
addKnownMethod
Exact, case-sensitive HTTP methods to be used in the HTTP method tag for automatic metrics, defaulted to the standard HTTP methods; assigning this value fully replaces the set of method names.Default known HTTP methods:
CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,QUERY, andTRACE. Unlisted methods are reported as_OTHER, so configurations that add additional method names must also include default methods they intend to retain.Method names are matched exactly. See the OpenTelemetry semantic convention for HTTP request methods.
- Parameters:
knownMethod- add single known HTTP methods- Returns:
- updated builder instance
- See Also:
-
useUpdatedHttpMetrics
Deprecated.This option is ignored and will be removed in a future release.Retained for configuration compatibility with Helidon 4.x; Helidon 27 ignores the value and always uses the updated automatic HTTP metrics behavior.- Parameters:
useUpdatedHttpMetrics- configured value, which does not affect automatic HTTP metrics behavior- 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
-
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
-
knownMethods
Exact, case-sensitive HTTP methods to be used in the HTTP method tag for automatic metrics, defaulted to the standard HTTP methods; assigning this value fully replaces the set of method names.Default known HTTP methods:
CONNECT,DELETE,GET,HEAD,OPTIONS,PATCH,POST,PUT,QUERY, andTRACE. Unlisted methods are reported as_OTHER, so configurations that add additional method names must also include default methods they intend to retain.Method names are matched exactly. See the OpenTelemetry semantic convention for HTTP request methods.
- Returns:
- known HTTP methods
-
useUpdatedHttpMetrics
Deprecated.This option is ignored and will be removed in a future release.Retained for configuration compatibility with Helidon 4.x; Helidon 27 ignores the value and always uses the updated automatic HTTP metrics behavior.- Returns:
- configured value, which does not affect automatic HTTP metrics behavior
-
toString
-
preBuildPrototype
protected void preBuildPrototype()Handles providers and decorators. -
validatePrototype
protected void validatePrototype()Validates required properties. -
config
-