Search in sources :

Example 1 with OpenSslSessionStats

use of io.netty.handler.ssl.OpenSslSessionStats in project zuul by Netflix.

the class BaseSslContextFactory method configureOpenSslStatsMetrics.

public void configureOpenSslStatsMetrics(SslContext sslContext, String sslContextId) {
    // Setup metrics tracking the OpenSSL stats.
    if (sslContext instanceof ReferenceCountedOpenSslContext) {
        OpenSslSessionStats stats = ((ReferenceCountedOpenSslContext) sslContext).sessionContext().stats();
        openSslStatGauge(stats, sslContextId, "accept", OpenSslSessionStats::accept);
        openSslStatGauge(stats, sslContextId, "accept_good", OpenSslSessionStats::acceptGood);
        openSslStatGauge(stats, sslContextId, "accept_renegotiate", OpenSslSessionStats::acceptRenegotiate);
        openSslStatGauge(stats, sslContextId, "number", OpenSslSessionStats::number);
        openSslStatGauge(stats, sslContextId, "connect", OpenSslSessionStats::connect);
        openSslStatGauge(stats, sslContextId, "connect_good", OpenSslSessionStats::connectGood);
        openSslStatGauge(stats, sslContextId, "connect_renegotiate", OpenSslSessionStats::connectRenegotiate);
        openSslStatGauge(stats, sslContextId, "hits", OpenSslSessionStats::hits);
        openSslStatGauge(stats, sslContextId, "cb_hits", OpenSslSessionStats::cbHits);
        openSslStatGauge(stats, sslContextId, "misses", OpenSslSessionStats::misses);
        openSslStatGauge(stats, sslContextId, "timeouts", OpenSslSessionStats::timeouts);
        openSslStatGauge(stats, sslContextId, "cache_full", OpenSslSessionStats::cacheFull);
        openSslStatGauge(stats, sslContextId, "ticket_key_fail", OpenSslSessionStats::ticketKeyFail);
        openSslStatGauge(stats, sslContextId, "ticket_key_new", OpenSslSessionStats::ticketKeyNew);
        openSslStatGauge(stats, sslContextId, "ticket_key_renew", OpenSslSessionStats::ticketKeyRenew);
        openSslStatGauge(stats, sslContextId, "ticket_key_resume", OpenSslSessionStats::ticketKeyResume);
    }
}
Also used : ReferenceCountedOpenSslContext(io.netty.handler.ssl.ReferenceCountedOpenSslContext) OpenSslSessionStats(io.netty.handler.ssl.OpenSslSessionStats)

Aggregations

OpenSslSessionStats (io.netty.handler.ssl.OpenSslSessionStats)1 ReferenceCountedOpenSslContext (io.netty.handler.ssl.ReferenceCountedOpenSslContext)1