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
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.io.ssl.SslHandshakeListener
org.eclipse.jetty.io.ssl.SslHandshakeListener.Event
-
Constructor Summary
ConstructorDescriptionJettySslHandshakeMetrics
(MeterRegistry registry) JettySslHandshakeMetrics
(MeterRegistry registry, Iterable<Tag> tags) JettySslHandshakeMetrics
(MeterRegistry registry, org.eclipse.jetty.server.Connector connector) Create aJettySslHandshakeMetrics
instance.JettySslHandshakeMetrics
(MeterRegistry registry, org.eclipse.jetty.server.Connector connector, Iterable<Tag> tags) Create aJettySslHandshakeMetrics
instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addToAllConnectors
(org.eclipse.jetty.server.Server server, MeterRegistry registry) static void
addToAllConnectors
(org.eclipse.jetty.server.Server server, MeterRegistry registry, Iterable<Tag> tags) void
handshakeFailed
(org.eclipse.jetty.io.ssl.SslHandshakeListener.Event event, Throwable failure) void
handshakeSucceeded
(org.eclipse.jetty.io.ssl.SslHandshakeListener.Event event)
-
Constructor Details
-
JettySslHandshakeMetrics
-
JettySslHandshakeMetrics
-
JettySslHandshakeMetrics
public JettySslHandshakeMetrics(MeterRegistry registry, org.eclipse.jetty.server.Connector connector) Create aJettySslHandshakeMetrics
instance.Connector.getName()
will be used for connector.name tag.- Parameters:
registry
- registry to useconnector
- connector to instrument- Since:
- 1.8.0
-
JettySslHandshakeMetrics
public JettySslHandshakeMetrics(MeterRegistry registry, org.eclipse.jetty.server.Connector connector, Iterable<Tag> tags) Create aJettySslHandshakeMetrics
instance.Connector.getName()
will be used for connector.name tag.- Parameters:
registry
- registry to useconnector
- connector to instrumenttags
- 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 interfaceorg.eclipse.jetty.io.ssl.SslHandshakeListener
-
handshakeFailed
public void handshakeFailed(org.eclipse.jetty.io.ssl.SslHandshakeListener.Event event, Throwable failure) - Specified by:
handshakeFailed
in interfaceorg.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)
-