Class JettySslHandshakeMetrics

java.lang.Object
io.micrometer.core.instrument.binder.jetty.JettySslHandshakeMetrics
All Implemented Interfaces:
EventListener, org.eclipse.jetty.io.ssl.SslHandshakeListener

public class JettySslHandshakeMetrics extends Object implements org.eclipse.jetty.io.ssl.SslHandshakeListener
Jetty SSL/TLS handshake metrics.

Usage example:


 MeterRegistry registry = ...;
 Server server = new Server(0);
 Connector connector = new ServerConnector(server);
 connector.addBean(new JettySslHandshakeMetrics(registry));
 server.setConnectors(new Connector[] { connector });
 
Alternatively, configure on all connectors with addToAllConnectors(Server, MeterRegistry, Iterable).
Since:
1.5.0
  • Constructor Details

    • JettySslHandshakeMetrics

      public JettySslHandshakeMetrics(MeterRegistry registry)
    • JettySslHandshakeMetrics

      public JettySslHandshakeMetrics(MeterRegistry registry, Iterable<Tag> tags)
    • JettySslHandshakeMetrics

      public JettySslHandshakeMetrics(MeterRegistry registry, org.eclipse.jetty.server.Connector connector)
      Create a JettySslHandshakeMetrics instance. Connector.getName() will be used for connector.name tag.
      Parameters:
      registry - registry to use
      connector - connector to instrument
      Since:
      1.8.0
    • JettySslHandshakeMetrics

      public JettySslHandshakeMetrics(MeterRegistry registry, org.eclipse.jetty.server.Connector connector, Iterable<Tag> tags)
      Create a JettySslHandshakeMetrics instance. Connector.getName() will be used for connector.name tag.
      Parameters:
      registry - registry to use
      connector - connector to instrument
      tags - tags to add to metrics
      Since:
      1.8.0
  • Method Details

    • handshakeSucceeded

      public void handshakeSucceeded(org.eclipse.jetty.io.ssl.SslHandshakeListener.Event event)
      Specified by:
      handshakeSucceeded in interface org.eclipse.jetty.io.ssl.SslHandshakeListener
    • handshakeFailed

      public void handshakeFailed(org.eclipse.jetty.io.ssl.SslHandshakeListener.Event event, Throwable failure)
      Specified by:
      handshakeFailed in interface org.eclipse.jetty.io.ssl.SslHandshakeListener
    • addToAllConnectors

      public static void addToAllConnectors(org.eclipse.jetty.server.Server server, MeterRegistry registry, Iterable<Tag> tags)
    • addToAllConnectors

      public static void addToAllConnectors(org.eclipse.jetty.server.Server server, MeterRegistry registry)