Class DefaultClientHttpObservationConvention
java.lang.Object
org.springframework.http.client.observation.DefaultClientHttpObservationConvention
- All Implemented Interfaces:
io.micrometer.observation.KeyValuesConvention
,io.micrometer.observation.ObservationConvention<ClientHttpObservationContext>
,ClientHttpObservationConvention
public class DefaultClientHttpObservationConvention
extends Object
implements ClientHttpObservationConvention
Default implementation for a
ClientHttpObservationConvention
,
extracting information from the ClientHttpObservationContext
.- Since:
- 6.0
- Author:
- Brian Clozel
-
Field Summary
Fields inherited from interface io.micrometer.observation.ObservationConvention
EMPTY
-
Constructor Summary
ConstructorDescriptionCreate a convention with the default name"http.client.requests"
.Create a convention with a custom name. -
Method Summary
Modifier and TypeMethodDescriptionprotected io.micrometer.common.KeyValue
clientName
(ClientHttpObservationContext context) protected io.micrometer.common.KeyValue
exception
(ClientHttpObservationContext context) io.micrometer.common.KeyValues
io.micrometer.common.KeyValues
getName()
protected io.micrometer.common.KeyValue
method
(ClientHttpObservationContext context) protected static io.micrometer.common.KeyValue
outcome
(ClientHttpObservationContext context) protected io.micrometer.common.KeyValue
requestUri
(ClientHttpObservationContext context) protected io.micrometer.common.KeyValue
status
(ClientHttpObservationContext context) protected io.micrometer.common.KeyValue
uri
(ClientHttpObservationContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.http.client.observation.ClientHttpObservationConvention
supportsContext
-
Constructor Details
-
DefaultClientHttpObservationConvention
public DefaultClientHttpObservationConvention()Create a convention with the default name"http.client.requests"
. -
DefaultClientHttpObservationConvention
Create a convention with a custom name.- Parameters:
name
- the observation name
-
-
Method Details
-
getName
- Specified by:
getName
in interfaceio.micrometer.observation.ObservationConvention<ClientHttpObservationContext>
-
getContextualName
- Specified by:
getContextualName
in interfaceio.micrometer.observation.ObservationConvention<ClientHttpObservationContext>
-
getLowCardinalityKeyValues
public io.micrometer.common.KeyValues getLowCardinalityKeyValues(ClientHttpObservationContext context) - Specified by:
getLowCardinalityKeyValues
in interfaceio.micrometer.observation.ObservationConvention<ClientHttpObservationContext>
-
uri
-
method
-
status
-
exception
-
outcome
-
getHighCardinalityKeyValues
public io.micrometer.common.KeyValues getHighCardinalityKeyValues(ClientHttpObservationContext context) - Specified by:
getHighCardinalityKeyValues
in interfaceio.micrometer.observation.ObservationConvention<ClientHttpObservationContext>
-
requestUri
-
clientName
-