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
ConstructorDescriptionHttpExchangeTracer
(Set<Include> includes) Creates a newHttpExchangeTracer
that will use the givenincludes
to determine the contents of its traces. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
postProcessRequestHeaders
(Map<String, List<String>> headers) Post-process the given mutable map of requestheaders
.final HttpTrace
receivedRequest
(TraceableRequest request) Begins the tracing of the exchange that was initiated by the givenrequest
being received.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
.
-
Constructor Details
-
HttpExchangeTracer
Creates a newHttpExchangeTracer
that will use the givenincludes
to determine the contents of its traces.- Parameters:
includes
- the includes
-
-
Method Details
-
receivedRequest
Begins the tracing of the exchange that was initiated by the givenrequest
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 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
-