Class ClientRequestObservationContext

java.lang.Object
io.micrometer.observation.Observation.Context
io.micrometer.observation.transport.SenderContext<C>
io.micrometer.observation.transport.RequestReplySenderContext<io.micronaut.http.MutableHttpRequest<?>,io.micronaut.http.HttpResponse<?>>
io.micronaut.micrometer.observation.http.client.instrumentation.ClientRequestObservationContext
All Implemented Interfaces:
io.micrometer.observation.Observation.ContextView, io.micrometer.observation.transport.ResponseContext<io.micronaut.http.HttpResponse<?>>

@Internal public final class ClientRequestObservationContext extends io.micrometer.observation.transport.RequestReplySenderContext<io.micronaut.http.MutableHttpRequest<?>,io.micronaut.http.HttpResponse<?>>
Context that holds information for metadata collection during the client HTTP exchanges observations.

This context also extends RequestReplySenderContext for propagating observation information with the HTTP client exchange.

  • Constructor Summary

    Constructors
    Constructor
    Description
    ClientRequestObservationContext(io.micronaut.http.MutableHttpRequest<?> request)
    Create an observation context for MutableHttpRequest observations.
  • Method Summary

    Methods inherited from class io.micrometer.observation.transport.RequestReplySenderContext

    getResponse, setResponse

    Methods inherited from class io.micrometer.observation.transport.SenderContext

    getCarrier, getKind, getRemoteServiceAddress, getRemoteServiceName, getSetter, setCarrier, setRemoteServiceAddress, setRemoteServiceName

    Methods inherited from class io.micrometer.observation.Observation.Context

    addHighCardinalityKeyValue, addHighCardinalityKeyValues, addLowCardinalityKeyValue, addLowCardinalityKeyValues, clear, computeIfAbsent, containsKey, get, getAllKeyValues, getContextualName, getError, getHighCardinalityKeyValue, getHighCardinalityKeyValues, getLowCardinalityKeyValue, getLowCardinalityKeyValues, getName, getOrDefault, getParentObservation, getRequired, put, remove, removeHighCardinalityKeyValue, removeHighCardinalityKeyValues, removeLowCardinalityKeyValue, removeLowCardinalityKeyValues, setContextualName, setError, setName, setParentObservation, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.micrometer.observation.Observation.ContextView

    getOrDefault
  • Constructor Details

    • ClientRequestObservationContext

      public ClientRequestObservationContext(io.micronaut.http.MutableHttpRequest<?> request)
      Create an observation context for MutableHttpRequest observations.
      Parameters:
      request - the HTTP client request