public interface BaseMetricsSettings
Settings which control base metrics.
Application code can control the operation of base metrics collection, enabling it or disabling it as a whole using
BaseMetricsSettings.Builder.enabled(boolean) as well as selectively enabling or disabling specific base metrics using
BaseMetricsSettings.Builder.enableBaseMetric(String, boolean).
Callers can also pass a Config object to builder or static
factory methods as well.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder forBaseMetricsSettings. -
Method Summary
Modifier and TypeMethodDescriptionstatic BaseMetricsSettings.Builderbuilder()Creates a new instance of the builder forBaseMetricsSettings.static BaseMetricsSettings.Builderbuilder(BaseMetricsSettings baseMetricsSettings) Creates a new instance of the builder based on the current settings in aBaseMetricsSettingsobject.static BaseMetricsSettingscreate()Creates a new instance ofBaseMetricsSettingswith defaults.static BaseMetricsSettingsCreates a new instance ofBaseMetricsSettingsbased on the specifiedConfignode containing base metrics settings.booleanisBaseMetricEnabled(String dottedName) boolean
-
Method Details
-
create
Creates a new instance ofBaseMetricsSettingswith defaults.- Returns:
- new default instance
-
create
Creates a new instance ofBaseMetricsSettingsbased on the specifiedConfignode containing base metrics settings.- Parameters:
config-Confignode containing base metrics settings- Returns:
- new
BaseMetricsSettingsaccording to the configuration
-
builder
Creates a new instance of the builder forBaseMetricsSettings.- Returns:
- new builder
-
builder
Creates a new instance of the builder based on the current settings in aBaseMetricsSettingsobject.- Parameters:
baseMetricsSettings- existing base metrics settings- Returns:
- new
Builderinitialized with the provided settings
-
isEnabled
boolean isEnabled()- Returns:
- whether base metrics are enabled in the settings.
-
isBaseMetricEnabled
- Parameters:
dottedName- dotted name (e.g.,memory.usedHeap) for the base metric of interest- Returns:
- whether that metric is enabled or not
-
baseMetricEnabledSettings
- Returns:
Mapfrom base metric names to explicit enabled/disabled settings
-