Class JettyClientMetrics
java.lang.Object
io.micrometer.core.instrument.binder.jetty.JettyClientMetrics
- All Implemented Interfaces:
EventListener
,org.eclipse.jetty.client.api.Request.BeginListener
,org.eclipse.jetty.client.api.Request.CommitListener
,org.eclipse.jetty.client.api.Request.ContentListener
,org.eclipse.jetty.client.api.Request.FailureListener
,org.eclipse.jetty.client.api.Request.HeadersListener
,org.eclipse.jetty.client.api.Request.Listener
,org.eclipse.jetty.client.api.Request.QueuedListener
,org.eclipse.jetty.client.api.Request.RequestListener
,org.eclipse.jetty.client.api.Request.SuccessListener
@Incubating(since="1.5.0")
public class JettyClientMetrics
extends Object
implements org.eclipse.jetty.client.api.Request.Listener
Provides request metrics for Jetty
HttpClient
,
configured as a Request.Listener
.
Incubating in case there emerges a better way to handle path variable detection.- Since:
- 1.5.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.client.api.Request.Listener
org.eclipse.jetty.client.api.Request.Listener.Adapter
-
Constructor Summary
ModifierConstructorDescriptionprotected
JettyClientMetrics
(MeterRegistry registry, JettyClientTagsProvider tagsProvider, String timingMetricName, String contentSizeMetricName, int maxUriTags) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionstatic JettyClientMetrics.Builder
builder
(MeterRegistry registry, JettyClientTagsProvider tagsProvider) Deprecated.since 1.11.0 in favor ofbuilder(MeterRegistry, BiFunction)
;JettyClientMetrics.Builder.tagsProvider(JettyClientTagsProvider)
can be used to provide a custom tags providerstatic JettyClientMetrics.Builder
builder
(MeterRegistry registry, BiFunction<org.eclipse.jetty.client.api.Request, org.eclipse.jetty.client.api.Result, String> uriPatternFunction) Create a builder forJettyClientMetrics
.void
onQueued
(org.eclipse.jetty.client.api.Request request) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.client.api.Request.Listener
onBegin, onCommit, onContent, onFailure, onHeaders, onSuccess
-
Constructor Details
-
JettyClientMetrics
@Deprecated protected JettyClientMetrics(MeterRegistry registry, JettyClientTagsProvider tagsProvider, String timingMetricName, String contentSizeMetricName, int maxUriTags) Deprecated.since 1.11.0 in favor ofbuilder(MeterRegistry, BiFunction)
-
-
Method Details
-
onQueued
public void onQueued(org.eclipse.jetty.client.api.Request request) - Specified by:
onQueued
in interfaceorg.eclipse.jetty.client.api.Request.Listener
- Specified by:
onQueued
in interfaceorg.eclipse.jetty.client.api.Request.QueuedListener
-
builder
@Deprecated public static JettyClientMetrics.Builder builder(MeterRegistry registry, JettyClientTagsProvider tagsProvider) Deprecated.since 1.11.0 in favor ofbuilder(MeterRegistry, BiFunction)
;JettyClientMetrics.Builder.tagsProvider(JettyClientTagsProvider)
can be used to provide a custom tags providerCreate a builder forJettyClientMetrics
.- Parameters:
registry
- meter registry to usetagsProvider
- tags provider for customizing tagging- Returns:
- builder
-
builder
public static JettyClientMetrics.Builder builder(MeterRegistry registry, BiFunction<org.eclipse.jetty.client.api.Request, org.eclipse.jetty.client.api.Result, String> uriPatternFunction) Create a builder forJettyClientMetrics
.- Parameters:
registry
- meter registry to useuriPatternFunction
- how to extract the URI pattern for tagging- Returns:
- builder
- Since:
- 1.11.0
-
builder(MeterRegistry, BiFunction)