Class HttpExchangeTracer
java.lang.Object
org.springframework.boot.actuate.trace.http.HttpExchangeTracer
Traces an HTTP request-response exchange.
- Since:
- 2.0.0
- Author:
- Andy Wilkinson
-
Constructor Summary
ConstructorsConstructorDescriptionHttpExchangeTracer(Set<Include> includes) Creates a newHttpExchangeTracerthat will use the givenincludesto determine the contents of its traces. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidpostProcessRequestHeaders(Map<String, List<String>> headers) Post-process the given mutable map of requestheaders.final HttpTracereceivedRequest(TraceableRequest request) Begins the tracing of the exchange that was initiated by the givenrequestbeing received.final voidsendingResponse(HttpTrace trace, TraceableResponse response, Supplier<Principal> principal, Supplier<String> sessionId) Ends the tracing of the exchange that is being concluded by sending the givenresponse.
-
Constructor Details
-
HttpExchangeTracer
Creates a newHttpExchangeTracerthat will use the givenincludesto determine the contents of its traces.- Parameters:
includes- the includes
-
-
Method Details
-
receivedRequest
Begins the tracing of the exchange that was initiated by the givenrequestbeing 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 givenresponse.- Parameters:
trace- the trace for the exchangeresponse- the response that concludes the exchangeprincipal- a supplier for the exchange's principalsessionId- a supplier for the id of the exchange's session
-
postProcessRequestHeaders
Post-process the given mutable map of requestheaders.- Parameters:
headers- the headers to post-process
-