Class VertxTcpMetrics

    • Field Detail

      • nameConnections

        final String nameConnections
    • Constructor Detail

      • VertxTcpMetrics

        VertxTcpMetrics​(io.micrometer.core.instrument.MeterRegistry registry,
                        String prefix)
    • Method Detail

      • connected

        public Map<String,​Object> connected​(io.vertx.core.net.SocketAddress remoteAddress,
                                                  String remoteName)
        Called when a client has connected, which is applicable for TCP connections.

        The remote name of the client is a best effort to provide the name of the remote host, i.e if the name is specified at creation time, this name will be used otherwise it will be the remote address.

        Specified by:
        connected in interface io.vertx.core.spi.metrics.TCPMetrics<Map<String,​Object>>
        Parameters:
        remoteAddress - the remote address of the client
        remoteName - the remote name of the client
        Returns:
        a map for socket metric context
      • disconnected

        public void disconnected​(Map<String,​Object> socketMetric,
                                 io.vertx.core.net.SocketAddress remoteAddress)
        Called when a client has disconnected, which is applicable for TCP connections.
        Specified by:
        disconnected in interface io.vertx.core.spi.metrics.TCPMetrics<Map<String,​Object>>
        Parameters:
        socketMetric - a Map for socket metric context or null
        remoteAddress - the remote address of the client