public interface VertxMetrics extends Metrics, Measured
HttpServer
, EventBusMetrics
, etc.DISABLE_METRICS_PROPERTY_NAME, METRICS_ENABLED
Modifier and Type | Method and Description |
---|---|
default DatagramSocketMetrics |
createDatagramSocketMetrics(DatagramSocketOptions options)
Provides the datagram/udp metrics SPI when a datagram socket is created.
|
default EventBusMetrics |
createEventBusMetrics()
Provides the event bus metrics SPI when the event bus is created.
|
default HttpClientMetrics<?,?,?,?,?> |
createHttpClientMetrics(HttpClientOptions options)
Provides the http client metrics SPI when an http client has been created.
|
default HttpServerMetrics<?,?,?> |
createHttpServerMetrics(HttpServerOptions options,
SocketAddress localAddress)
Provides the http server metrics SPI when an http server is created.
|
default TCPMetrics<?> |
createNetClientMetrics(NetClientOptions options)
Provides the net client metrics SPI when a net client is created.
|
default TCPMetrics<?> |
createNetServerMetrics(NetServerOptions options,
SocketAddress localAddress)
Provides the net server metrics SPI when a net server is created.
|
default PoolMetrics<?> |
createPoolMetrics(String poolType,
String poolName,
int maxPoolSize)
Provides the pool metrics SPI.
|
default void |
timerCreated(long id)
Called when a timer is created
|
default void |
timerEnded(long id,
boolean cancelled)
Called when a timer has ended (setTimer) or has been cancelled.
|
default void |
verticleDeployed(Verticle verticle)
Called when a verticle is deployed in Vert.x .
|
default void |
verticleUndeployed(Verticle verticle)
Called when a verticle is undeployed in Vert.x .
|
default void |
vertxCreated(Vertx vertx)
Callback to signal when the Vertx instance is fully initialized.
|
isMetricsEnabled
default void verticleDeployed(Verticle verticle)
This method is invoked with Context
and thread of the deployed verticle and therefore
might be different on every invocation.
verticle
- the verticle which was deployeddefault void verticleUndeployed(Verticle verticle)
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 verticleDeployed(io.vertx.core.Verticle)
invocation.
verticle
- the verticle which was undeployeddefault void timerCreated(long id)
No specific thread and context can be expected when this method is called.
id
- the id of the timerdefault void timerEnded(long id, boolean cancelled)
No specific thread and context can be expected when this method is called.
id
- the id of the timercancelled
- if the timer was cancelled by the userdefault EventBusMetrics createEventBusMetrics()
No specific thread and context can be expected when this method is called.
This method should be called only once.
null
when metrics are disableddefault HttpServerMetrics<?,?,?> createHttpServerMetrics(HttpServerOptions options, SocketAddress localAddress)
No 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.
options
- the options used to create the HttpServer
localAddress
- localAddress the local address the net socket is listening onnull
when metrics are disableddefault HttpClientMetrics<?,?,?,?,?> createHttpClientMetrics(HttpClientOptions options)
No specific thread and context can be expected when this method is called.
options
- the options used to create the HttpClient
null
when metrics are disableddefault TCPMetrics<?> createNetServerMetrics(NetServerOptions options, SocketAddress localAddress)
No 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.
options
- the options used to create the NetServer
localAddress
- localAddress the local address the net socket is listening onnull
when metrics are disableddefault TCPMetrics<?> createNetClientMetrics(NetClientOptions options)
No specific thread and context can be expected when this method is called.
options
- the options used to create the NetClient
null
when metrics are disableddefault DatagramSocketMetrics createDatagramSocketMetrics(DatagramSocketOptions options)
No specific thread and context can be expected when this method is called.
options
- the options used to create the DatagramSocket
null
when metrics are disableddefault PoolMetrics<?> createPoolMetrics(String poolType, String poolName, int maxPoolSize)
poolType
- 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 disableddefault void vertxCreated(Vertx vertx)
vertx
- the instance of VertxCopyright © 2023 Eclipse. All rights reserved.