Class HttpExchangeTracer

java.lang.Object
org.springframework.boot.actuate.trace.http.HttpExchangeTracer

public class HttpExchangeTracer extends Object
Traces an HTTP request-response exchange.
Since:
2.0.0
Author:
Andy Wilkinson
  • Constructor Details

    • HttpExchangeTracer

      public HttpExchangeTracer(Set<Include> includes)
      Creates a new HttpExchangeTracer that will use the given includes to determine the contents of its traces.
      Parameters:
      includes - the includes
  • Method Details

    • receivedRequest

      public final HttpTrace receivedRequest(TraceableRequest request)
      Begins the tracing of the exchange that was initiated by the given request being received.
      Parameters:
      request - the received request
      Returns:
      the HTTP trace for the
    • sendingResponse

      public final void sendingResponse(HttpTrace trace, TraceableResponse response, Supplier<Principal> principal, Supplier<String> sessionId)
      Ends the tracing of the exchange that is being concluded by sending the given response.
      Parameters:
      trace - the trace for the exchange
      response - the response that concludes the exchange
      principal - a supplier for the exchange's principal
      sessionId - a supplier for the id of the exchange's session
    • postProcessRequestHeaders

      protected void postProcessRequestHeaders(Map<String,List<String>> headers)
      Post-process the given mutable map of request headers.
      Parameters:
      headers - the headers to post-process