类 HttpExchangeTracer
- java.lang.Object
- org.springframework.boot.actuate.trace.http.HttpExchangeTracer
public class HttpExchangeTracer extends Object
Traces an HTTP request-response exchange.- 从以下版本开始:
- 2.0.0
构造器概要
构造器 构造器 说明 HttpExchangeTracer(Set<Include> includes)
Creates a newHttpExchangeTracer
that will use the givenincludes
to determine the contents of its traces.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected void
postProcessRequestHeaders(Map<String,List<String>> headers)
Post-process the given mutable map of requestheaders
.HttpTrace
receivedRequest(TraceableRequest request)
Begins the tracing of the exchange that was initiated by the givenrequest
being received.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
.
构造器详细资料
HttpExchangeTracer
public HttpExchangeTracer(Set<Include> includes)
Creates a newHttpExchangeTracer
that will use the givenincludes
to determine the contents of its traces.- 参数:
includes
- the includes
方法详细资料
receivedRequest
public final HttpTrace receivedRequest(TraceableRequest request)
Begins the tracing of the exchange that was initiated by the givenrequest
being received.- 参数:
request
- the received request- 返回:
- 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
.- 参数:
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
protected void postProcessRequestHeaders(Map<String,List<String>> headers)
Post-process the given mutable map of requestheaders
.- 参数:
headers
- the headers to post-process