public class VertxHawkularOptions
extends io.vertx.core.metrics.MetricsOptions
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_BATCH_DELAY
Default value for the maximum delay between two consecutive batches (in seconds) = 1.
|
static int |
DEFAULT_BATCH_SIZE
Default value for the maximum number of metrics in a batch = 50.
|
static String |
DEFAULT_HOST
The default Hawkular server host = localhost.
|
static String |
DEFAULT_METRICS_BRIDGE_ADDRESS
Default event bus address where applications can send business-related metrics.
|
static boolean |
DEFAULT_METRICS_BRIDGE_ENABLED
The default value to enable / disable the metrics bridge.
|
static String |
DEFAULT_METRICS_URI
The default Hawkular Metrics service URI = /hawkular/metrics.
|
static int |
DEFAULT_PORT
The default Hawkular server port = 8080.
|
static String |
DEFAULT_PREFIX
The default metric name prefix (empty).
|
static int |
DEFAULT_SCHEDULE
Default value for metric collection interval (in seconds) = 1.
|
static boolean |
DEFAULT_SEND_TENANT_HEADER
The default value to enable / disable sending the tenant header.
|
static int |
DEFAULT_TAGGED_METRICS_CACHE_SIZE
The default number of metric names to cache in order to avoid repeated tagging requests = 4096.
|
static String |
DEFAULT_TENANT
The default Hawkular tenant = default.
|
Constructor and Description |
---|
VertxHawkularOptions() |
VertxHawkularOptions(io.vertx.core.json.JsonObject json) |
VertxHawkularOptions(VertxHawkularOptions other) |
Modifier and Type | Method and Description |
---|---|
VertxHawkularOptions |
addDisabledMetricsType(MetricsType metricsType)
Set metric that will not be registered.
|
VertxHawkularOptions |
addMetricTagsMatch(MetricTagsMatch metricTagsMatch)
Adds a
MetricTagsMatch . |
AuthenticationOptions |
getAuthenticationOptions() |
int |
getBatchDelay() |
int |
getBatchSize() |
Set<MetricsType> |
getDisabledMetricsTypes() |
String |
getHost() |
io.vertx.core.json.JsonObject |
getHttpHeaders() |
io.vertx.core.http.HttpClientOptions |
getHttpOptions() |
String |
getMetricsBridgeAddress() |
String |
getMetricsServiceUri() |
List<MetricTagsMatch> |
getMetricTagsMatches() |
int |
getPort() |
String |
getPrefix() |
int |
getSchedule() |
int |
getTaggedMetricsCacheSize() |
io.vertx.core.json.JsonObject |
getTags() |
String |
getTenant() |
boolean |
isMetricsBridgeEnabled()
Checks whether or not the metrics bridge is enabled.
|
boolean |
isMetricsTypeDisabled(MetricsType metricsType) |
boolean |
isSendTenantHeader() |
VertxHawkularOptions |
setAuthenticationOptions(AuthenticationOptions authenticationOptions)
Set the options for authentication.
|
VertxHawkularOptions |
setBatchDelay(int batchDelay)
Set the maximum delay between two consecutive batches (in seconds).
|
VertxHawkularOptions |
setBatchSize(int batchSize)
Set the maximum number of metrics in a batch.
|
void |
setDisabledMetricsTypes(Set<MetricsType> disabledMetricsTypes)
Sets metrics types that are disabled.
|
VertxHawkularOptions |
setEnabled(boolean enable)
Set whether metrics will be enabled on the Vert.x instance.
|
VertxHawkularOptions |
setHost(String host)
Set the Hawkular Metrics service host.
|
VertxHawkularOptions |
setHttpHeaders(io.vertx.core.json.JsonObject httpHeaders)
Set specific headers to include in HTTP requests.
|
VertxHawkularOptions |
setHttpOptions(io.vertx.core.http.HttpClientOptions httpOptions)
Set the configuration of the Hawkular Metrics HTTP client.
|
VertxHawkularOptions |
setMetricsBridgeAddress(String metricsBridgeAddress)
Sets the metric bridge address on which the application is sending the custom metrics.
|
VertxHawkularOptions |
setMetricsBridgeEnabled(boolean metricsBridgeEnabled)
Sets whether or not the metrics bridge should be enabled.
|
VertxHawkularOptions |
setMetricsServiceUri(String metricsServiceUri)
Set the Hawkular Metrics service URI.
|
VertxHawkularOptions |
setMetricTagsMatches(List<MetricTagsMatch> metricTagsMatches)
Sets a list of
MetricTagsMatch . |
VertxHawkularOptions |
setPort(int port)
Set the Hawkular Metrics service port.
|
VertxHawkularOptions |
setPrefix(String prefix)
Set the metric name prefix.
|
VertxHawkularOptions |
setSchedule(int schedule)
Set the metric collection interval (in seconds).
|
VertxHawkularOptions |
setSendTenantHeader(boolean sendTenantHeader)
Set whether Hawkular tenant header should be sent.
|
VertxHawkularOptions |
setTaggedMetricsCacheSize(int taggedMetricsCacheSize)
Set the number of metric names to cache in order to avoid repeated tagging requests.
|
VertxHawkularOptions |
setTags(io.vertx.core.json.JsonObject tags)
Set tags applied to all metrics.
|
VertxHawkularOptions |
setTenant(String tenant)
Set the Hawkular tenant.
|
public static final String DEFAULT_HOST
public static final int DEFAULT_PORT
public static final String DEFAULT_METRICS_URI
public static final String DEFAULT_TENANT
public static final boolean DEFAULT_SEND_TENANT_HEADER
public static final int DEFAULT_SCHEDULE
public static final String DEFAULT_PREFIX
public static final int DEFAULT_BATCH_SIZE
public static final int DEFAULT_BATCH_DELAY
public static final String DEFAULT_METRICS_BRIDGE_ADDRESS
source
and value
(double) fields.public static final boolean DEFAULT_METRICS_BRIDGE_ENABLED
public static final int DEFAULT_TAGGED_METRICS_CACHE_SIZE
public VertxHawkularOptions()
public VertxHawkularOptions(VertxHawkularOptions other)
public VertxHawkularOptions(io.vertx.core.json.JsonObject json)
public String getHost()
public VertxHawkularOptions setHost(String host)
localhost
.public int getPort()
public VertxHawkularOptions setPort(int port)
8080
.public io.vertx.core.http.HttpClientOptions getHttpOptions()
public VertxHawkularOptions setHttpOptions(io.vertx.core.http.HttpClientOptions httpOptions)
public String getMetricsServiceUri()
public VertxHawkularOptions setMetricsServiceUri(String metricsServiceUri)
/hawkular/metrics
. This can be useful if you host the
Hawkular server behind a proxy and manipulate the default service URI.public String getTenant()
public VertxHawkularOptions setTenant(String tenant)
default
.public boolean isSendTenantHeader()
public VertxHawkularOptions setSendTenantHeader(boolean sendTenantHeader)
true
.
Must be set to false
when working with pre-Alpha13 Hawkular servers.public AuthenticationOptions getAuthenticationOptions()
public VertxHawkularOptions setAuthenticationOptions(AuthenticationOptions authenticationOptions)
public io.vertx.core.json.JsonObject getHttpHeaders()
public VertxHawkularOptions setHttpHeaders(io.vertx.core.json.JsonObject httpHeaders)
public int getSchedule()
public VertxHawkularOptions setSchedule(int schedule)
1
.public String getPrefix()
public VertxHawkularOptions setPrefix(String prefix)
public int getBatchSize()
public VertxHawkularOptions setBatchSize(int batchSize)
batchSize
, or after the batchDelay
expires. Defaults to 50
.public int getBatchDelay()
public VertxHawkularOptions setBatchDelay(int batchDelay)
batchSize
, or after the batchDelay
expires. Defaults to 1
second.public VertxHawkularOptions setEnabled(boolean enable)
setEnabled
in class io.vertx.core.metrics.MetricsOptions
public String getMetricsBridgeAddress()
source
and value
fields (value
is a double).public VertxHawkularOptions setMetricsBridgeAddress(String metricsBridgeAddress)
id
and
value
fields.
Don't forget to also enable the bridge with metricsBridgeEnabled
.metricsBridgeAddress
- the addressVertxHawkularOptions
instancepublic boolean isMetricsBridgeEnabled()
true
if the metrics bridge is enabled, false
otherwise.public VertxHawkularOptions setMetricsBridgeEnabled(boolean metricsBridgeEnabled)
metricsBridgeEnabled
- true
to enable the bridge, false
to disable it.VertxHawkularOptions
instancepublic Set<MetricsType> getDisabledMetricsTypes()
public void setDisabledMetricsTypes(Set<MetricsType> disabledMetricsTypes)
disabledMetricsTypes
- to specify the set of metrics types to be disabled.public VertxHawkularOptions addDisabledMetricsType(MetricsType metricsType)
disabledMetricsTypes
when
registering metrics suppliersmetricsType
- the type of metricsVertxHawkularOptions
instancepublic boolean isMetricsTypeDisabled(MetricsType metricsType)
public io.vertx.core.json.JsonObject getTags()
public VertxHawkularOptions setTags(io.vertx.core.json.JsonObject tags)
public int getTaggedMetricsCacheSize()
public VertxHawkularOptions setTaggedMetricsCacheSize(int taggedMetricsCacheSize)
public List<MetricTagsMatch> getMetricTagsMatches()
MetricTagsMatch
public VertxHawkularOptions setMetricTagsMatches(List<MetricTagsMatch> metricTagsMatches)
MetricTagsMatch
.metricTagsMatches
- a list of MetricTagsMatch
public VertxHawkularOptions addMetricTagsMatch(MetricTagsMatch metricTagsMatch)
MetricTagsMatch
.Copyright © 2018. All rights reserved.