public interface VertxMetrics extends Metrics, Measured
HttpServer
, EventBusMetrics
, etc.DISABLE_METRICS_PROPERTY_NAME, METRICS_ENABLED
Modifier and Type | Method and Description |
---|---|
default ClientMetrics<?,?,?,?> |
createClientMetrics(SocketAddress remoteAddress,
String type,
String namespace)
Provides the client metrics SPI when a client has been created.
|
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 |
vertxCreated(Vertx vertx)
Callback to signal when the Vertx instance is fully initialized.
|
isMetricsEnabled
default 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 ClientMetrics<?,?,?,?> createClientMetrics(SocketAddress remoteAddress, String type, String namespace)
No specific thread and context can be expected when this method is called.
remoteAddress
- the server remote addresstype
- the metrics type, e.g http
or ws
namespace
- an optional namespace for scoping the metricsnull
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 © 2021 Eclipse. All rights reserved.