Class ServiceObservationContext

java.lang.Object
io.micrometer.observation.Observation.Context
io.micrometer.observation.transport.ReceiverContext<C>
io.micrometer.observation.transport.RequestReplyReceiverContext<HttpRequest,RequestLog>
com.linecorp.armeria.server.observation.ServiceObservationContext
All Implemented Interfaces:
io.micrometer.observation.Observation.ContextView, io.micrometer.observation.transport.ResponseContext<RequestLog>

@UnstableApi public final class ServiceObservationContext extends io.micrometer.observation.transport.RequestReplyReceiverContext<HttpRequest,RequestLog>
A Observation.Context which may be used in conjunction with ObservationService to implement custom ObservationConventions or ObservationHandlers.

 ObservationConvention<ServiceObservationContext> convention = ...
 Server.builder()
       .decorator(ObservationService.newDecorator(registry, convention))
 ...
 
  • Method Summary

    Modifier and Type
    Method
    Description
    The HttpRequest associated with this Observation.Context.
    The ServiceRequestContext associated with this Observation.Context.
     

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

    getResponse, setResponse

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

    getCarrier, getGetter, getKind, getRemoteServiceAddress, getRemoteServiceName, 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

    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
  • Method Details

    • requestContext

      public ServiceRequestContext requestContext()
      The ServiceRequestContext associated with this Observation.Context.
    • httpRequest

      public HttpRequest httpRequest()
      The HttpRequest associated with this Observation.Context.
    • toString

      public String toString()
      Overrides:
      toString in class io.micrometer.observation.Observation.Context