Module io.helidon.metrics.api
Package io.helidon.metrics.api
Class MetricsConfig.BuilderBase.MetricsConfigImpl
java.lang.Object
io.helidon.metrics.api.MetricsConfig.BuilderBase.MetricsConfigImpl
- All Implemented Interfaces:
Prototype.Api,MetricsConfig
- Enclosing class:
MetricsConfig.BuilderBase<BUILDER extends MetricsConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends MetricsConfig>
protected static class MetricsConfig.BuilderBase.MetricsConfigImpl
extends Object
implements MetricsConfig
Generated implementation of the prototype, can be extended by descendant prototype implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.helidon.metrics.api.MetricsConfig
MetricsConfig.Builder, MetricsConfig.BuilderBase<BUILDER extends MetricsConfig.BuilderBase<BUILDER,PROTOTYPE>, PROTOTYPE extends MetricsConfig> -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMetricsConfigImpl(MetricsConfig.BuilderBase<?, ?> builder) Create an instance providing a builder. -
Method Summary
Modifier and TypeMethodDescriptionappName()Value for the application tag to be added to each meter ID.Name for the application tag to be added to each meter ID.Output format for built-in meter names.config()Metrics configuration node.booleanenabled()Whether metrics functionality is enabled.booleanWhether thegc.timemeter should be registered as a gauge (vs.inthashCode()booleanisMeterEnabled(String name, String targetScope) Reports whether the specified meter within the indicated scope is enabled, according to the metrics configuration.booleanisScopeEnabled(String scope) Reports whether the specified scope is enabled, according to any scope configuration that is part of this metrics configuration.Default units for timer output in JSON if not specified on a given timer.Key performance indicator metrics settings.lookupConfig(String key) Looks up a single config value within the metrics configuration by config key.booleanWhether to allow anybody to access the endpoint.booleanWhether automatic REST request metrics should be measured.Whether automatic REST request metrics should be measured (as indicated by the deprecated config keyrest-request-enabled, the config key using a hyphen instead of a dot separator).roles()Hints for role names the user is expected to be in.scoping()Settings related to scoping management.tags()Global tags.toString()booleanWhether Helidon should expose meters related to virtual threads.Threshold for sampling pinned virtual threads to include in the pinned threads meter.
-
Field Details
-
METRICS_CONFIG_KEY
The config key containing settings for all of metrics.- See Also:
-
SCOPE_CONFIG_KEY
Config key for scope-related settings.- See Also:
-
KEY_PERFORMANCE_INDICATORS_CONFIG_KEY
Config key for KPI metrics settings.- See Also:
-
DEFAULT_JSON_UNITS_DEFAULT
-
-
Constructor Details
-
MetricsConfigImpl
Create an instance providing a builder.- Parameters:
builder- extending builder base of this prototype
-
-
Method Details
-
lookupConfig
Description copied from interface:MetricsConfigLooks up a single config value within the metrics configuration by config key.- Specified by:
lookupConfigin interfaceMetricsConfig- Parameters:
key- config key to fetch- Returns:
- config value
-
isScopeEnabled
Description copied from interface:MetricsConfigReports whether the specified scope is enabled, according to any scope configuration that is part of this metrics configuration.- Specified by:
isScopeEnabledin interfaceMetricsConfig- Parameters:
scope- scope name- Returns:
- true if the scope as a whole is enabled; false otherwise
-
isMeterEnabled
Description copied from interface:MetricsConfigReports whether the specified meter within the indicated scope is enabled, according to the metrics configuration.- Specified by:
isMeterEnabledin interfaceMetricsConfig- Parameters:
name- meter nametargetScope- scope within which to check- Returns:
- whether the meter is enabled
-
enabled
public boolean enabled()Description copied from interface:MetricsConfigWhether metrics functionality is enabled.- Specified by:
enabledin interfaceMetricsConfig- Returns:
- if metrics are configured to be enabled
-
permitAll
public boolean permitAll()Description copied from interface:MetricsConfigWhether to allow anybody to access the endpoint.- Specified by:
permitAllin interfaceMetricsConfig- Returns:
- whether to permit access to metrics endpoint to anybody, defaults to
true - See Also:
-
roles
Description copied from interface:MetricsConfigHints for role names the user is expected to be in.- Specified by:
rolesin interfaceMetricsConfig- Returns:
- list of hints
-
keyPerformanceIndicatorMetricsConfig
Description copied from interface:MetricsConfigKey performance indicator metrics settings.- Specified by:
keyPerformanceIndicatorMetricsConfigin interfaceMetricsConfig- Returns:
- key performance indicator metrics settings
-
tags
Description copied from interface:MetricsConfigGlobal tags.- Specified by:
tagsin interfaceMetricsConfig- Returns:
- name/value pairs for global tags
-
appName
Description copied from interface:MetricsConfigValue for the application tag to be added to each meter ID.- Specified by:
appNamein interfaceMetricsConfig- Returns:
- application tag value
-
appTagName
Description copied from interface:MetricsConfigName for the application tag to be added to each meter ID.- Specified by:
appTagNamein interfaceMetricsConfig- Returns:
- application tag name
-
scoping
Description copied from interface:MetricsConfigSettings related to scoping management.- Specified by:
scopingin interfaceMetricsConfig- Returns:
- scoping settings
-
restRequestEnabled
public boolean restRequestEnabled()Description copied from interface:MetricsConfigWhether automatic REST request metrics should be measured.- Specified by:
restRequestEnabledin interfaceMetricsConfig- Returns:
- true/false
-
restRequestEnabledShadow
Description copied from interface:MetricsConfigWhether automatic REST request metrics should be measured (as indicated by the deprecated config keyrest-request-enabled, the config key using a hyphen instead of a dot separator).- Specified by:
restRequestEnabledShadowin interfaceMetricsConfig- Returns:
- true/false
-
virtualThreadsEnabled
public boolean virtualThreadsEnabled()Description copied from interface:MetricsConfigWhether Helidon should expose meters related to virtual threads.- Specified by:
virtualThreadsEnabledin interfaceMetricsConfig- Returns:
- true to include meters related to virtual threads
-
virtualThreadsPinnedThreshold
Description copied from interface:MetricsConfigThreshold for sampling pinned virtual threads to include in the pinned threads meter.- Specified by:
virtualThreadsPinnedThresholdin interfaceMetricsConfig- Returns:
- threshold used to filter virtual thread pinning events
-
config
Description copied from interface:MetricsConfigMetrics configuration node.- Specified by:
configin interfaceMetricsConfig- Returns:
- metrics configuration
-
gcTimeType
Description copied from interface:MetricsConfigWhether thegc.timemeter should be registered as a gauge (vs. a counter). Thegc.timemeter 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.- Specified by:
gcTimeTypein interfaceMetricsConfig- Returns:
- the type of meter to use for registering
gc.time
-
builtInMeterNameFormat
Description copied from interface:MetricsConfigOutput format for built-in meter names.BuiltInMeterNameFormat.SNAKEselects "snake_case" which does not conform to the MicroProfile Metrics specification.- Specified by:
builtInMeterNameFormatin interfaceMetricsConfig- Returns:
- the output format for built-in meter names
-
jsonUnitsDefault
Description copied from interface:MetricsConfigDefault units for timer output in JSON if not specified on a given timer.If the configuration key is absent, the Helidon JSON output uses
TimeUnit.SECONDS. If the configuration key is present, Helidon formats each timer using that timer's specific units (if set) and the config value otherwise.- Specified by:
jsonUnitsDefaultin interfaceMetricsConfig- Returns:
- default
TimeUnitto use for JSON timer output
-
toString
-
equals
-
hashCode
public int hashCode()
-