Interface VertxMetrics
HttpServer, EventBusMetrics, etc.- Author:
- Nick Scavelli
-
Field Summary
Fields inherited from interface Metrics
METRICS_ENABLED -
Method Summary
Modifier and TypeMethodDescriptiondefault ClientMetrics<?, ?, ?> createClientMetrics(SocketAddress remoteAddress, String type, String namespace) Provides the client metrics SPI when a client has been created.default DatagramSocketMetricsProvides the datagram/udp metrics SPI when a datagram socket is created.default EventBusMetricsProvides the event bus metrics SPI when the event bus is created.default HttpClientMetrics<?, ?> Provides the http client metrics SPI when an http client has been created.default HttpServerMetrics<?, ?> createHttpServerMetrics(HttpServerConfig config, SocketAddress tcpLocalAddress, SocketAddress udpLocalAddress) Provides the http server metrics SPI when an http server is created.default PoolMetrics<?, ?> createPoolMetrics(String type, String name, int maxSize) Provides the pool metrics SPI.default TransportMetrics<?> createQuicEndpointMetrics(QuicEndpointConfig config, String protocol, SocketAddress localAddress) Provides the quic endpoint metrics SPI when a quic endpoint is created.default TransportMetrics<?> createTcpClientMetrics(TcpClientConfig config, String protocol) Provides the TCP client metrics SPI when a net client is created.default TransportMetrics<?> createTcpServerMetrics(TcpServerConfig config, String protocol, SocketAddress localAddress) Provides the net server metrics SPI when a net server is created.default voidvertxCreated(Vertx vertx) Callback to signal when the Vertx instance is fully initialized.Methods inherited from interface Measured
isMetricsEnabled
-
Method Details
-
createEventBusMetrics
Provides the event bus metrics SPI when the event bus is created.No specific thread and context can be expected when this method is called.
This method should be called only once.
- Returns:
- the event bus metrics SPI or
nullwhen metrics are disabled
-
createHttpServerMetrics
default HttpServerMetrics<?,?> createHttpServerMetrics(HttpServerConfig config, SocketAddress tcpLocalAddress, SocketAddress udpLocalAddress) Provides the http server metrics SPI when an http server is created.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
localAddresswhen a server is scaled, it is the responsibility of the metrics implementation to eventually merge metrics. In this case the providedserverargument can be used to distinguish the differentHttpServerMetricsinstances.- Parameters:
config- the options used to create theHttpServertcpLocalAddress- the local address the TCP server is listening onudpLocalAddress- the lcoal address the QUIC server is listenin on- Returns:
- the http server metrics SPI or
nullwhen metrics are disabled
-
createClientMetrics
default ClientMetrics<?,?, createClientMetrics?> (SocketAddress remoteAddress, String type, String namespace) Provides the client metrics SPI when a client has been created.No specific thread and context can be expected when this method is called.
- Parameters:
remoteAddress- the server remote addresstype- the metrics type, e.ghttporwsnamespace- an optional namespace for scoping the metrics- Returns:
- the client metrics SPI or
nullwhen metrics are disabled
-
createHttpClientMetrics
Provides the http client metrics SPI when an http client has been created.No specific thread and context can be expected when this method is called.
- Parameters:
config- the config used to create theHttpClient- Returns:
- the http client metrics SPI or
nullwhen metrics are disabled
-
createTcpServerMetrics
default TransportMetrics<?> createTcpServerMetrics(TcpServerConfig config, String protocol, SocketAddress localAddress) Provides the net server metrics SPI when a net server is created.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
localAddresswhen a server is scaled, it is the responsibility of the metrics implementation to eventually merge metrics. In this case the providedserverargument can be used to distinguish the differentTCPMetricsinstances.- Parameters:
config- the options used to create theNetServerprotocol- the protocol type, e.g.http,nullwhen unknownlocalAddress- localAddress the local address the net socket is listening on- Returns:
- the net server metrics SPI or
nullwhen metrics are disabled
-
createTcpClientMetrics
Provides the TCP client metrics SPI when a net client is created.No specific thread and context can be expected when this method is called.
- Parameters:
config- the options used to create theNetClientprotocol- the protocol type, e.g.http,nullwhen unknown- Returns:
- the net client metrics SPI or
nullwhen metrics are disabled
-
createQuicEndpointMetrics
default TransportMetrics<?> createQuicEndpointMetrics(QuicEndpointConfig config, String protocol, SocketAddress localAddress) Provides the quic endpoint metrics SPI when a quic endpoint is created.
invalid input: '<'Note: this method can be called more than one time for the same
localAddresswhen a server is scaled, it is the responsibility of the metrics implementation to eventually merge metrics. In this case the providedserverargument can be used to distinguish the different metrics instances.- Parameters:
config- the config used to create theNetServerprotocol- the protocol type, e.g.http,nullwhen unknownlocalAddress- localAddress the local address of the UDP socket the endpoint is listening on- Returns:
- the net server metrics SPI or
nullwhen metrics are disabled
-
createDatagramSocketMetrics
Provides the datagram/udp metrics SPI when a datagram socket is created.No specific thread and context can be expected when this method is called.
- Parameters:
options- the options used to create theDatagramSocket- Returns:
- the datagram metrics SPI or
nullwhen metrics are disabled
-
createPoolMetrics
Provides the pool metrics SPI.- Parameters:
type- the type of the pool e.g. worker, datasource, etc...name- the name of the resource the inherent pool belongs tomaxSize- the max size, or-1if the number cannot be determined- Returns:
- the pool metrics SPI or
nullwhen metrics are disabled
-
vertxCreated
Callback to signal when the Vertx instance is fully initialized. Other methods can be called before this method when the instance is being constructed.- Parameters:
vertx- the instance of Vertx
-