private void incrementCounters()

in zuul-core/src/main/java/com/netflix/zuul/netty/server/ssl/SslHandshakeInfoHandler.java [237:269]


    private void incrementCounters(
            SslHandshakeCompletionEvent sslHandshakeCompletionEvent, SslHandshakeInfo handshakeInfo) {
        try {
            if (sslHandshakeCompletionEvent.isSuccess()) {
                String proto = handshakeInfo.getProtocol().length() > 0 ? handshakeInfo.getProtocol() : "unknown";
                String ciphsuite =
                        handshakeInfo.getCipherSuite().length() > 0 ? handshakeInfo.getCipherSuite() : "unknown";
                spectatorRegistry
                        .counter(
                                "server.ssl.handshake",
                                "success",
                                "true",
                                "protocol",
                                proto,
                                "ciphersuite",
                                ciphsuite,
                                "clientauth",
                                String.valueOf(handshakeInfo.getClientAuthRequirement()))
                        .increment();
            } else {
                spectatorRegistry
                        .counter(
                                "server.ssl.handshake",
                                "success",
                                "false",
                                "failure_cause",
                                getFailureCause(sslHandshakeCompletionEvent.cause()))
                        .increment();
            }
        } catch (Exception e) {
            logger.error("Error incrementing counters for SSL handshake!", e);
        }
    }