Interface ApacheHttpClientObservationConvention

All Superinterfaces:
io.micrometer.observation.KeyValuesConvention, io.micrometer.observation.ObservationConvention<ApacheHttpClientContext>
All Known Implementing Classes:
DefaultApacheHttpClientObservationConvention

public interface ApacheHttpClientObservationConvention extends io.micrometer.observation.ObservationConvention<ApacheHttpClientContext>
ObservationConvention for Apache HTTP Client 5 instrumentation.
Since:
1.11.0
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Name of the HttpClientContext attribute that should hold the String representation of the URI template used for creating the client URL.

    Fields inherited from interface io.micrometer.observation.ObservationConvention

    EMPTY
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    supportsContext(io.micrometer.observation.Observation.Context context)
     

    Methods inherited from interface io.micrometer.observation.ObservationConvention

    getContextualName, getHighCardinalityKeyValues, getLowCardinalityKeyValues, getName
  • Field Details

    • URI_TEMPLATE_ATTRIBUTE

      static final String URI_TEMPLATE_ATTRIBUTE
      Name of the HttpClientContext attribute that should hold the String representation of the URI template used for creating the client URL.

      This value can be contributed as a KeyValue to the recorded observations.

       String uriTemplate = "/users/{id}";
       HttpClientContext clientContext = ...
       clientContext.setAttribute(ApacheHttpClientObservationConvention.URI_TEMPLATE_ATTRIBUTE, uriTemplate);
       
      Since:
      1.12.0
      See Also:
  • Method Details

    • supportsContext

      default boolean supportsContext(io.micrometer.observation.Observation.Context context)
      Specified by:
      supportsContext in interface io.micrometer.observation.ObservationConvention<ApacheHttpClientContext>