-
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 usingBaseMetricsSettings.Builder.enableBaseMetric(String, boolean)
.Callers can also pass a
Config
object to builder or static factory methods as well.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
BaseMetricsSettings.Builder
Builder forBaseMetricsSettings
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,Boolean>
baseMetricEnabledSettings()
static BaseMetricsSettings.Builder
builder()
Creates a new instance of the builder forBaseMetricsSettings
.static BaseMetricsSettings.Builder
builder(BaseMetricsSettings baseMetricsSettings)
Creates a new instance of the builder based on the current settings in aBaseMetricsSettings
object.static BaseMetricsSettings
create()
Creates a new instance ofBaseMetricsSettings
with defaults.static BaseMetricsSettings
create(Config config)
Creates a new instance ofBaseMetricsSettings
based on the specifiedConfig
node containing base metrics settings.boolean
isBaseMetricEnabled(String dottedName)
boolean
isEnabled()
-
-
-
Method Detail
-
create
static BaseMetricsSettings create()
Creates a new instance ofBaseMetricsSettings
with defaults.- Returns:
- new default instance
-
create
static BaseMetricsSettings create(Config config)
Creates a new instance ofBaseMetricsSettings
based on the specifiedConfig
node containing base metrics settings.- Parameters:
config
-Config
node containing base metrics settings- Returns:
- new
BaseMetricsSettings
according to the configuration
-
builder
static BaseMetricsSettings.Builder builder()
Creates a new instance of the builder forBaseMetricsSettings
.- Returns:
- new builder
-
builder
static BaseMetricsSettings.Builder builder(BaseMetricsSettings baseMetricsSettings)
Creates a new instance of the builder based on the current settings in aBaseMetricsSettings
object.- Parameters:
baseMetricsSettings
- existing base metrics settings- Returns:
- new
Builder
initialized with the provided settings
-
isEnabled
boolean isEnabled()
- Returns:
- whether base metrics are enabled in the settings.
-
isBaseMetricEnabled
boolean isBaseMetricEnabled(String dottedName)
- Parameters:
dottedName
- dotted name (e.g.,memory.usedHeap
) for the base metric of interest- Returns:
- whether that metric is enabled or not
-
-