- All Superinterfaces:
Builder<MetricsSettings.Builder,
,MetricsSettings> Supplier<MetricsSettings>
- Enclosing interface:
- MetricsSettings
public static interface MetricsSettings.Builder
extends Builder<MetricsSettings.Builder,MetricsSettings>
Builder for
MetricsSettings
.-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Config key for the app tag value to be applied to all metrics in this application.static final String
Config key within the configmetrics
section controlling the base registry.static final String
Default web context for the metrics endpoint.static final String
Config key within the configmetrics
section controlling whether metrics are enabled.static final String
Config key withinmetrics
for strict (vs.static final String
Config key for comma-separated,tag=value
global tag settings.static final String
The config key containing settings for all of metrics.static final String
Config key within the configmetrics
section containing settings for individual registries. -
Method Summary
Modifier and TypeMethodDescriptionappTagValue
(String appTag) Sets the value for the_app
tag to be applied to all metrics.baseMetricsSettings
(BaseMetricsSettings.Builder baseMetricsSettingsBuilder) Set the base metrics settings.build()
Constructs aMetricsSettings
object from the builder.Updates the builder using the provided metrics config.enabled
(boolean value) Sets whether metrics should be enabled.globalTags
(Map<String, String> globalTags) Sets the global tags to be applied to all metrics.Set the KPI metrics settings.registrySettings
(MetricRegistry.Type registryType, RegistrySettings registrySettings) Sets the registry settings for the specified registry type.
-
Field Details
-
ENABLED_CONFIG_KEY
Config key within the configmetrics
section controlling whether metrics are enabled.- See Also:
-
METRICS_CONFIG_KEY
The config key containing settings for all of metrics.- See Also:
-
BASE_CONFIG_KEY
Config key within the configmetrics
section controlling the base registry.- See Also:
-
REGISTRIES_CONFIG_KEY
Config key within the configmetrics
section containing settings for individual registries.- See Also:
-
DEFAULT_CONTEXT
Default web context for the metrics endpoint.- See Also:
-
EXEMPLARS_STRICT_CONFIG_KEY
Config key withinmetrics
for strict (vs. lax) exemplar behavior.- See Also:
-
GLOBAL_TAGS_CONFIG_KEY
Config key for comma-separated,tag=value
global tag settings.- See Also:
-
APP_TAG_CONFIG_KEY
Config key for the app tag value to be applied to all metrics in this application.- See Also:
-
-
Method Details
-
build
MetricsSettings build()Constructs aMetricsSettings
object from the builder.- Specified by:
build
in interfaceBuilder<MetricsSettings.Builder,
MetricsSettings> - Returns:
- new settings instance based on the builder
-
enabled
Sets whether metrics should be enabled.- Parameters:
value
- true if metrics should be enabled; false if not- Returns:
- updated builder
-
config
Updates the builder using the provided metrics config.- Parameters:
config
- the component's or the overallmetrics
config from the configuration- Returns:
- updated builder
-
keyPerformanceIndicatorSettings
MetricsSettings.Builder keyPerformanceIndicatorSettings(KeyPerformanceIndicatorMetricsSettings.Builder kpiSettings) Set the KPI metrics settings.- Parameters:
kpiSettings
- key performance indicator metrics settings to use- Returns:
- updated builder
-
baseMetricsSettings
Set the base metrics settings.- Parameters:
baseMetricsSettingsBuilder
- base metrics settings to use- Returns:
- updated builder
-
registrySettings
MetricsSettings.Builder registrySettings(MetricRegistry.Type registryType, RegistrySettings registrySettings) Sets the registry settings for the specified registry type.- Parameters:
registryType
- type of registry for which to assign settingsregistrySettings
- assigned registry settings- Returns:
- updated builder
-
globalTags
Sets the global tags to be applied to all metrics.- Parameters:
globalTags
- map of tag name/tag value pairs- Returns:
- updatedbuilder
-
appTagValue
Sets the value for the_app
tag to be applied to all metrics.- Parameters:
appTag
- app tag value- Returns:
- updated builder
-