Package com.codingchili.core.metrics
Class MetricSettings
java.lang.Object
com.codingchili.core.metrics.MetricSettings
Settings for the generation of metrics.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddFilter(Consumer<MetricFilter> consumer)
Adds a new filter to the metric configuration.allJvm()
enables all jvm performance metrics.io.vertx.core.metrics.MetricsOptions
io.vertx.core.json.JsonObject
filter(io.vertx.core.json.JsonObject json)
getJvm()
int
getRate()
boolean
boolean
setEnabled(boolean enabled)
setFilters(List<MetricFilter> filters)
setIncludes(Set<String> includes)
setOverhead(boolean overhead)
setRate(int rate)
-
Field Details
-
REGISTRY_NAME
- See Also:
- Constant Field Values
-
-
Constructor Details
-
MetricSettings
public MetricSettings()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Returns:
- true if metrics should be collected.
-
setEnabled
-
getIncludes
-
setIncludes
- Parameters:
includes
- a list of default includes for the filters.- Returns:
- fluent
-
include
- Parameters:
include
- a property to include for matching metrics.- Returns:
- fluent.
-
getRate
public int getRate()- Returns:
- the rate in ms at which metrics are collected.
-
setRate
- Parameters:
rate
- in milliseconds.- Returns:
- fluent.
-
getFilters
- Returns:
- a list of filters used to filter out performance metrics to greatly reduce the overhead of collection and indexing. If empty nothing will be filtered.
-
setFilters
-
addFilter
Adds a new filter to the metric configuration.- Parameters:
consumer
- the configurator.- Returns:
- fluent.
-
isOverhead
public boolean isOverhead() -
setOverhead
- Parameters:
overhead
- true if reporting overhead should be recorded.- Returns:
- fluent
-
allJvm
enables all jvm performance metrics.- Returns:
- fluent.
-
getJvm
-
setJvm
- Parameters:
jvm
- a set of jvm metrics to enable.- Returns:
- fluent.
-
jvm
- Parameters:
metrics
- a list of jvm metrics to enable.- Returns:
- fluent.
-
createVertxOptions
public io.vertx.core.metrics.MetricsOptions createVertxOptions()- Returns:
- metrics options which are passed to vertx.
-
filter
public io.vertx.core.json.JsonObject filter(io.vertx.core.json.JsonObject json)
-