public final class MeteredTlsStrategy extends Object implements TlsStrategy
TlsStrategy decorator that records TLS handshake metrics via Micrometer.
Exposes the following meters (names are prefixed by MetricConfig.prefix):
<prefix>.tls.handshake (timer) — TLS handshake latency<prefix>.tls.handshakes (counter) — handshake outcome countresult = ok|error|cancelsni (only when ObservingOptions.TagLevel#EXTENDED)common tags| Constructor and Description |
|---|
MeteredTlsStrategy(TlsStrategy delegate,
io.micrometer.core.instrument.MeterRegistry registry,
MetricConfig mc,
ObservingOptions opts)
Primary constructor.
|
MeteredTlsStrategy(TlsStrategy delegate,
io.micrometer.core.instrument.MeterRegistry registry,
String prefix)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
upgrade(TransportSecurityLayer sessionLayer,
HttpHost host,
SocketAddress localAddress,
SocketAddress remoteAddress,
Object attachment,
Timeout handshakeTimeout)
Deprecated.
Implementations should prefer the async overload; this remains to fulfill the interface.
|
void |
upgrade(TransportSecurityLayer sessionLayer,
NamedEndpoint endpoint,
Object attachment,
Timeout handshakeTimeout,
FutureCallback<TransportSecurityLayer> callback) |
public MeteredTlsStrategy(TlsStrategy delegate, io.micrometer.core.instrument.MeterRegistry registry, MetricConfig mc, ObservingOptions opts)
delegate - TLS strategy to wrapregistry - meter registrymc - metric configuration (prefix, common tags). If null, defaults are used.opts - observing options (tag level). If null, ObservingOptions.DEFAULT is used.@Deprecated public MeteredTlsStrategy(TlsStrategy delegate, io.micrometer.core.instrument.MeterRegistry registry, String prefix)
MeteredTlsStrategy(TlsStrategy, MeterRegistry, MetricConfig, ObservingOptions)
supplying MetricConfig and ObservingOptions.public void upgrade(TransportSecurityLayer sessionLayer, NamedEndpoint endpoint, Object attachment, Timeout handshakeTimeout, FutureCallback<TransportSecurityLayer> callback)
upgrade in interface TlsStrategy@Deprecated public boolean upgrade(TransportSecurityLayer sessionLayer, HttpHost host, SocketAddress localAddress, SocketAddress remoteAddress, Object attachment, Timeout handshakeTimeout)
upgrade in interface TlsStrategyCopyright © 1999–2021 The Apache Software Foundation. All rights reserved.