-
public interface MetricsSettings
Settings which control behavior for metrics overall.This class controls all of metrics, not just a single component's usage of metrics. For that, see
ComponentMetricsSettings
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
MetricsSettings.Builder
Builder forMetricsSettings
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description BaseMetricsSettings
baseMetricsSettings()
static MetricsSettings.Builder
builder()
Returns a builder forMetricsSettings
.static MetricsSettings.Builder
builder(MetricsSettings metricsSettings)
Creates a builder based on the values in an existingMetricsSettings
instance.static MetricsSettings
create()
Returns default metrics settings based on default config.static MetricsSettings
create(Config config)
Returns metrics settings based on aConfig
node, by convention themetrics
config section within the overallmetrics
config.boolean
isEnabled()
boolean
isMetricEnabled(MetricRegistry.Type registryType, String metricName)
Reports whether the specified metric is enabled in the indicated registry type.KeyPerformanceIndicatorMetricsSettings
keyPerformanceIndicatorSettings()
RegistrySettings
registrySettings(MetricRegistry.Type registryType)
Returns theRegistrySettings
for the indicated registry type.
-
-
-
Method Detail
-
create
static MetricsSettings create()
Returns default metrics settings based on default config.- Returns:
- new settings reflecting the default config
-
create
static MetricsSettings create(Config config)
Returns metrics settings based on aConfig
node, by convention themetrics
config section within the overallmetrics
config.Equivalent to
MetricsSettings.builder().config(config).build()
.- Parameters:
config
- the metrics config section- Returns:
- new settings reflecting the config, using defaults as needed
-
builder
static MetricsSettings.Builder builder()
Returns a builder forMetricsSettings
.- Returns:
- new builder
-
builder
static MetricsSettings.Builder builder(MetricsSettings metricsSettings)
Creates a builder based on the values in an existingMetricsSettings
instance.- Parameters:
metricsSettings
- existing instance to copy- Returns:
MetricsSettings.Builder
initialized according to the provided settings
-
isEnabled
boolean isEnabled()
- Returns:
- whether metrics are enabled according to the settings
-
keyPerformanceIndicatorSettings
KeyPerformanceIndicatorMetricsSettings keyPerformanceIndicatorSettings()
- Returns:
- the KPI metrics settings
-
baseMetricsSettings
BaseMetricsSettings baseMetricsSettings()
- Returns:
- the base metrics settings
-
isMetricEnabled
boolean isMetricEnabled(MetricRegistry.Type registryType, String metricName)
Reports whether the specified metric is enabled in the indicated registry type.- Parameters:
registryType
- which registry type to checkmetricName
- name of the metric to check- Returns:
- true if metrics overall is enabled and if the metric is enabled in the specified registry; false otherwise
-
registrySettings
RegistrySettings registrySettings(MetricRegistry.Type registryType)
Returns theRegistrySettings
for the indicated registry type.- Parameters:
registryType
- registry type of interest- Returns:
RegistrySettings
for the selected type
-
-