private void setupTlsMetrics(SslContext sslContext, TlsEngineType tlsEngineType, String hostnamePattern) {
        final MeterRegistry meterRegistry = config().meterRegistry();

        final SSLSession sslSession = validateSslContext(sslContext, tlsEngineType);
        final MeterIdPrefix meterIdPrefix = new MeterIdPrefix("armeria.server",
                                                              "hostname.pattern", hostnamePattern);
        for (Certificate certificate : sslSession.getLocalCertificates()) {
            if (!(certificate instanceof X509Certificate)) {
                continue;
            }

            try {
                MoreMeterBinders.certificateMetrics((X509Certificate) certificate, meterIdPrefix)
                                .bindTo(meterRegistry);
            } catch (Exception ex) {
                logger.warn("Failed to set up TLS certificate metrics for a host: {}", hostnamePattern, ex);
            }
        }
    }
Sets up gauge metric for each server certificate.
core/src/main/java/com/linecorp/armeria/server/Server.java