public class VertxMetricsImpl extends AbstractMetrics implements VertxMetrics
category, 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.
|
ClientMetrics<?,?,?,?> |
createClientMetrics(SocketAddress remoteAddress,
String type,
String namespace)
Provides the client metrics SPI when a client has been created.
|
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 |
isMetricsEnabled()
Whether the metrics are enabled for this measured object
|
baseName, registryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitvertxCreatedpublic VertxMetricsImpl(MicrometerMetricsOptions options, BackendRegistry backendRegistry)
options - Vertx Prometheus optionspublic 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 ClientMetrics<?,?,?,?> createClientMetrics(SocketAddress remoteAddress, String type, String namespace)
VertxMetricsNo specific thread and context can be expected when this method is called.
createClientMetrics in interface VertxMetricsremoteAddress - the server remote addresstype - the metrics type, e.g http or wsnamespace - an optional namespace for scoping the metricsnull when metrics are disabledpublic boolean isMetricsEnabled()
MeasuredisMetricsEnabled in interface Measuredtrue if metrics are enabledCopyright © 2021. All rights reserved.