public class VertxMetricsImpl extends AbstractMetrics implements VertxMetrics
domain, registryDISABLE_METRICS_PROPERTY_NAME, METRICS_ENABLED| Constructor and Description |
|---|
VertxMetricsImpl(MicrometerMetricsOptions options,
BackendRegistry backendRegistry) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Used to close out the metrics, for example when an http server/client has been closed.
No specific thread and context can be expected when this method is called.
|
DatagramSocketMetrics |
createDatagramSocketMetrics(DatagramSocketOptions options)
Provides the datagram/udp metrics SPI when a datagram socket is created.
|
EventBusMetrics |
createEventBusMetrics()
Provides the event bus metrics SPI when the event bus is created.
|
HttpClientMetrics<?,?,?,?,?> |
createHttpClientMetrics(HttpClientOptions httpClientOptions)
Provides the http client metrics SPI when an http client has been created.
|
HttpServerMetrics<?,?,?> |
createHttpServerMetrics(HttpServerOptions httpClientOptions,
SocketAddress socketAddress)
Provides the http server metrics SPI when an http server is created.
|
TCPMetrics<?> |
createNetClientMetrics(NetClientOptions netClientOptions)
Provides the net client metrics SPI when a net client is created.
|
TCPMetrics<?> |
createNetServerMetrics(NetServerOptions netServerOptions,
SocketAddress socketAddress)
Provides the net server metrics SPI when a net server is created.
|
PoolMetrics<?> |
createPoolMetrics(String poolType,
String poolName,
int maxPoolSize)
Provides the pool metrics SPI.
|
boolean |
isEnabled()
Whether the metrics are enabled.
|
boolean |
isMetricsEnabled()
Whether the metrics are enabled for this measured object
|
void |
timerCreated(long l)
Called when a timer is created
|
void |
timerEnded(long l,
boolean b)
Called when a timer has ended (setTimer) or has been cancelled.
|
void |
verticleDeployed(Verticle verticle)
Called when a verticle is deployed in Vert.x .
|
void |
verticleUndeployed(Verticle verticle)
Called when a verticle is undeployed in Vert.x .
|
baseName, registryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvertxCreatedpublic VertxMetricsImpl(MicrometerMetricsOptions options, BackendRegistry backendRegistry)
options - Vertx Prometheus optionspublic void verticleDeployed(Verticle verticle)
VertxMetrics
This method is invoked with Context and thread of the deployed verticle and therefore
might be different on every invocation.
verticleDeployed in interface VertxMetricsverticle - the verticle which was deployedpublic void verticleUndeployed(Verticle verticle)
VertxMetrics
This method is invoked with Context and thread of the deployed verticle and therefore
might be different on every invocation, however these are the same than the VertxMetrics.verticleDeployed(io.vertx.core.Verticle) invocation.
verticleUndeployed in interface VertxMetricsverticle - the verticle which was undeployedpublic void timerCreated(long l)
VertxMetricsNo specific thread and context can be expected when this method is called.
timerCreated in interface VertxMetricsl - the id of the timerpublic void timerEnded(long l,
boolean b)
VertxMetricsNo specific thread and context can be expected when this method is called.
timerEnded in interface VertxMetricsl - the id of the timerb - if the timer was cancelled by the userpublic EventBusMetrics createEventBusMetrics()
VertxMetricsNo specific thread and context can be expected when this method is called.
This method should be called only once.
createEventBusMetrics in interface VertxMetricsnull when metrics are disabledpublic HttpServerMetrics<?,?,?> createHttpServerMetrics(HttpServerOptions httpClientOptions, SocketAddress socketAddress)
VertxMetricsNo specific thread and context can be expected when this method is called.
Note: this method can be called more than one time for the same localAddress when a server is
scaled, it is the responsibility of the metrics implementation to eventually merge metrics. In this case
the provided server argument can be used to distinguish the different HttpServerMetrics
instances.
createHttpServerMetrics in interface VertxMetricshttpClientOptions - the options used to create the HttpServersocketAddress - localAddress the local address the net socket is listening onnull when metrics are disabledpublic HttpClientMetrics<?,?,?,?,?> createHttpClientMetrics(HttpClientOptions httpClientOptions)
VertxMetricsNo specific thread and context can be expected when this method is called.
createHttpClientMetrics in interface VertxMetricshttpClientOptions - the options used to create the HttpClientnull when metrics are disabledpublic TCPMetrics<?> createNetServerMetrics(NetServerOptions netServerOptions, SocketAddress socketAddress)
VertxMetricsNo specific thread and context can be expected when this method is called.
Note: this method can be called more than one time for the same localAddress when a server is
scaled, it is the responsibility of the metrics implementation to eventually merge metrics. In this case
the provided server argument can be used to distinguish the different TCPMetrics
instances.
createNetServerMetrics in interface VertxMetricsnetServerOptions - the options used to create the NetServersocketAddress - localAddress the local address the net socket is listening onnull when metrics are disabledpublic TCPMetrics<?> createNetClientMetrics(NetClientOptions netClientOptions)
VertxMetricsNo specific thread and context can be expected when this method is called.
createNetClientMetrics in interface VertxMetricsnetClientOptions - the options used to create the NetClientnull when metrics are disabledpublic DatagramSocketMetrics createDatagramSocketMetrics(DatagramSocketOptions options)
VertxMetricsNo specific thread and context can be expected when this method is called.
createDatagramSocketMetrics in interface VertxMetricsoptions - the options used to create the DatagramSocketnull when metrics are disabledpublic PoolMetrics<?> createPoolMetrics(String poolType, String poolName, int maxPoolSize)
VertxMetricscreatePoolMetrics in interface VertxMetricspoolType - the type of the pool e.g worker, datasource, etc..poolName - the name of the poolmaxPoolSize - the pool max size, or -1 if the number cannot be determinednull when metrics are disabledpublic boolean isMetricsEnabled()
MeasuredisMetricsEnabled in interface Measuredtrue if metrics are enabledpublic boolean isEnabled()
MetricsCopyright © 2020. All rights reserved.