Class DropwizardMetricsOptions
java.lang.Object
io.vertx.core.metrics.MetricsOptions
io.vertx.ext.dropwizard.DropwizardMetricsOptions
Vert.x Dropwizard metrics configuration.
- Author:
- Julien Viet
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanThe default value of JMX enabled =falseThe default monitored handlers :nullThe default monitored http client endpoints :nullThe default monitored http client uris :nullThe default monitored http server routes :nullThe default monitored http server uris :nullFields inherited from class MetricsOptions
DEFAULT_METRICS_ENABLED -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorCreate an instance from aJsonObjectCopy constructor with base metrics optionsCopy constructor -
Method Summary
Modifier and TypeMethodDescriptionaddMonitoredEventBusHandler(Match match) Add a monitored event bus handler.Add an monitored http client endpoint.addMonitoredHttpClientUri(Match match) Add an monitored http client uri.addMonitoredHttpServerRoute(Match match) Add an monitored http server route.addMonitoredHttpServerUri(Match match) Add an monitored http server uri.Get the JMX domain to use when JMX metrics are enabled.An optional name used for registering the metrics in the Dropwizard shared registry.booleanWill JMX be enabled on the Vert.x instance?setBaseName(String baseName) Set a custom baseName for metrics.setConfigPath(String configPath) Set the path for a config file that contains options in JSON format, to be used to create a new options object.setEnabled(boolean enable) Set whether metrics will be enabled on the Vert.x instance.setJmxDomain(String jmxDomain) Set the JMX domain to use when JMX metrics are enabled.setJmxEnabled(boolean jmxEnabled) Set whether JMX will be enabled on the Vert.x instance.setRegistryName(String registryName) Set the name used for registering the metrics in the Dropwizard shared registry.toJson()Methods inherited from class MetricsOptions
isEnabled, toString
-
Field Details
-
DEFAULT_JMX_ENABLED
public static final boolean DEFAULT_JMX_ENABLEDThe default value of JMX enabled =false- See Also:
-
DEFAULT_MONITORED_HANDLERS
-
DEFAULT_MONITORED_HTTP_SERVER_URIS
-
DEFAULT_MONITORED_HTTP_SERVER_ROUTES
-
DEFAULT_MONITORED_HTTP_CLIENT_URIS
-
DEFAULT_MONITORED_HTTP_CLIENT_ENDPOINTS
-
-
Constructor Details
-
DropwizardMetricsOptions
public DropwizardMetricsOptions()Default constructor -
DropwizardMetricsOptions
Copy constructor with base metrics options- Parameters:
other- The otherMetricsOptionsto copy when creating this
-
DropwizardMetricsOptions
Copy constructor- Parameters:
other- The otherDropwizardMetricsOptionsto copy when creating this
-
DropwizardMetricsOptions
Create an instance from aJsonObject- Parameters:
json- the JsonObject to create it from
-
-
Method Details
-
getRegistryName
An optional name used for registering the metrics in the Dropwizard shared registry.- Returns:
- the registry name
-
setRegistryName
Set the name used for registering the metrics in the Dropwizard shared registry.- Parameters:
registryName- the name- Returns:
- a reference to this, so the API can be used fluently
-
isJmxEnabled
public boolean isJmxEnabled()Will JMX be enabled on the Vert.x instance?- Returns:
- true if enabled, false if not.
-
setJmxEnabled
Set whether JMX will be enabled on the Vert.x instance.- Parameters:
jmxEnabled- true if JMX enabled, or false if not.- Returns:
- a reference to this, so the API can be used fluently
-
getJmxDomain
Get the JMX domain to use when JMX metrics are enabled.- Returns:
- the JMX domain
-
setJmxDomain
Set the JMX domain to use when JMX metrics are enabled.- Parameters:
jmxDomain- the JMX domain- Returns:
- a reference to this, so the API can be used fluently
-
getMonitoredEventBusHandlers
-
addMonitoredEventBusHandler
Add a monitored event bus handler.- Parameters:
match- the event bus address match- Returns:
- a reference to this, so the API can be used fluently
-
getMonitoredHttpServerUris
-
addMonitoredHttpServerUri
Add an monitored http server uri.- Parameters:
match- the handler match- Returns:
- a reference to this, so the API can be used fluently
-
getMonitoredHttpServerRoutes
-
addMonitoredHttpServerRoute
Add an monitored http server route.- Parameters:
match- the handler match- Returns:
- a reference to this, so the API can be used fluently
-
getMonitoredHttpClientUris
-
setEnabled
Description copied from class:MetricsOptionsSet whether metrics will be enabled on the Vert.x instance.- Overrides:
setEnabledin classMetricsOptions- Parameters:
enable- true if metrics enabled, or false if not.- Returns:
- a reference to this, so the API can be used fluently
-
getConfigPath
- Returns:
- the path for a config file to create an Options object from.
-
setConfigPath
Set the path for a config file that contains options in JSON format, to be used to create a new options object. The file will be looked for on the file system first and then on the classpath if it's not found.- Parameters:
configPath- the file name- Returns:
- a reference to this, so the API can be used fluently
-
addMonitoredHttpClientUri
Add an monitored http client uri.- Parameters:
match- the handler match- Returns:
- a reference to this, so the API can be used fluently
-
addMonitoredHttpClientEndpoint
Add an monitored http client endpoint.- Parameters:
match- the handler match- Returns:
- a reference to this, so the API can be used fluently
-
getMonitoredHttpClientEndpoint
-
setBaseName
Set a custom baseName for metrics.- Parameters:
baseName- the new baseName.- Returns:
- a reference to this, so the API can be used fluently
-
getBaseName
- Returns:
- The custom baseName.
-
toJson
- Overrides:
toJsonin classMetricsOptions- Returns:
- a JSON representation of these options
-