public interface RequestLogBuilder extends RequestLogAccess
RequestLog with newly available information.| Modifier and Type | Method and Description |
|---|---|
void |
addChild(RequestLogAccess child)
Adds the specified
RequestLogAccess so that the logs are propagated from the child. |
void |
deferRequestContent()
Allows setting the request content using
requestContent(Object, Object) even after
endRequest() is called. |
void |
deferRequestContentPreview()
Allows setting the request content preview using
requestContentPreview(String) even after
endRequest() is called. |
void |
deferResponseContent()
Allows setting the response content using
responseContent(Object, Object) even after
endResponse() is called. |
void |
deferResponseContentPreview()
Allows setting the response content preview using
responseContentPreview(String) even after
endResponse() is called. |
void |
endRequest()
Finishes the collection of the
Request information. |
void |
endRequest(long requestEndTimeNanos)
Finishes the collection of the
Request information. |
void |
endRequest(Throwable requestCause)
Finishes the collection of the
Request information. |
void |
endRequest(Throwable requestCause,
long requestEndTimeNanos)
Finishes the collection of the
Request information. |
void |
endResponse()
Finishes the collection of the
Response information. |
void |
endResponse(long responseEndTimeNanos)
Finishes the collection of the
Response information. |
void |
endResponse(Throwable responseCause)
Finishes the collection of the
Response information. |
void |
endResponse(Throwable responseCause,
long responseEndTimeNanos)
Finishes the collection of the
Response information. |
void |
endResponseWithLastChild()
Fills the response-side logs from the last added child.
|
void |
increaseRequestLength(HttpData data)
|
void |
increaseRequestLength(long deltaBytes)
Increases the
RequestOnlyLog.requestLength() by deltaBytes. |
void |
increaseResponseLength(HttpData data)
|
void |
increaseResponseLength(long deltaBytes)
Increases the
RequestLog.responseLength() by deltaBytes. |
void |
name(String name)
Sets the human-readable name of the
Request, such as RPC method name, annotated service method
name or HTTP method name. |
void |
requestContent(Object requestContent,
Object rawRequestContent)
Sets the
RequestOnlyLog.requestContent() and the RequestOnlyLog.rawRequestContent(). |
void |
requestContentPreview(String requestContentPreview)
Sets the
RequestOnlyLog.requestContentPreview(). |
void |
requestFirstBytesTransferred()
|
void |
requestFirstBytesTransferred(long requestFirstBytesTransferredNanos)
Sets
RequestOnlyLog.requestFirstBytesTransferredTimeNanos() with the specified timestamp. |
void |
requestHeaders(RequestHeaders requestHeaders)
Sets the
RequestOnlyLog.requestHeaders(). |
void |
requestLength(long requestLength)
Sets the
RequestOnlyLog.requestLength(). |
void |
requestTrailers(HttpHeaders requestTrailers)
Sets the
RequestOnlyLog.requestTrailers(). |
void |
responseContent(Object responseContent,
Object rawResponseContent)
Sets the
RequestLog.responseContent() and the RequestLog.rawResponseContent(). |
void |
responseContentPreview(String responseContentPreview)
Sets the
RequestLog.responseContentPreview(). |
void |
responseFirstBytesTransferred()
|
void |
responseFirstBytesTransferred(long responseFirstBytesTransferredNanos)
Sets
RequestLog.responseFirstBytesTransferredTimeNanos() with the specified timestamp. |
void |
responseHeaders(ResponseHeaders responseHeaders)
Sets the
RequestLog.responseHeaders(). |
void |
responseLength(long responseLength)
Sets the
RequestLog.responseLength(). |
void |
responseTrailers(HttpHeaders responseTrailers)
Sets the
RequestLog.responseTrailers(). |
void |
serializationFormat(SerializationFormat serializationFormat)
Sets the
SerializationFormat. |
void |
session(io.netty.channel.Channel channel,
SessionProtocol sessionProtocol,
ClientConnectionTimings connectionTimings)
Sets the properties related with socket connection.
|
void |
session(io.netty.channel.Channel channel,
SessionProtocol sessionProtocol,
SSLSession sslSession,
ClientConnectionTimings connectionTimings)
Sets the properties related with socket connection.
|
default void |
startRequest()
Starts the collection of the
Request information. |
void |
startRequest(long requestStartTimeNanos,
long requestStartTimeMicros)
Starts the collection of the
Request information. |
void |
startResponse()
Starts the collection of
Response information. |
void |
startResponse(long responseStartTimeNanos,
long responseStartTimeMicros)
Starts the collection of
Response information. |
availabilityStamp, children, context, ensureAvailable, ensureAvailable, ensureAvailable, ensureComplete, ensureRequestComplete, isAvailable, isAvailable, isAvailable, isComplete, isRequestComplete, partial, whenAvailable, whenAvailable, whenAvailable, whenComplete, whenRequestCompletedefault void startRequest()
Request information. This method sets the following properties:
void startRequest(long requestStartTimeNanos,
long requestStartTimeMicros)
Request information. This method sets the following properties:
requestStartTimeNanos - System.nanoTime() value when the request started.requestStartTimeMicros - the number of microseconds since the epoch,
e.g. System.currentTimeMillis() * 1000.void session(io.netty.channel.Channel channel,
SessionProtocol sessionProtocol,
ClientConnectionTimings connectionTimings)
channel - the Channel which handled the Request.sessionProtocol - the SessionProtocol of the connection.void session(io.netty.channel.Channel channel,
SessionProtocol sessionProtocol,
SSLSession sslSession,
ClientConnectionTimings connectionTimings)
channel - the Channel which handled the Request.sessionProtocol - the SessionProtocol of the connection.sslSession - the SSLSession of the connection, or null.void serializationFormat(SerializationFormat serializationFormat)
SerializationFormat.void name(String name)
Request, such as RPC method name, annotated service method
name or HTTP method name. This property is often used as a meter tag or distributed trace's span name.void increaseRequestLength(long deltaBytes)
RequestOnlyLog.requestLength() by deltaBytes.void increaseRequestLength(HttpData data)
void requestLength(long requestLength)
RequestOnlyLog.requestLength().void requestFirstBytesTransferred()
void requestFirstBytesTransferred(long requestFirstBytesTransferredNanos)
RequestOnlyLog.requestFirstBytesTransferredTimeNanos() with the specified timestamp.void requestHeaders(RequestHeaders requestHeaders)
RequestOnlyLog.requestHeaders().void requestContent(Object requestContent, Object rawRequestContent)
RequestOnlyLog.requestContent() and the RequestOnlyLog.rawRequestContent().
If the specified requestContent is an RpcRequest and
the RequestContext.rpcRequest() is null, this method will call
RequestContext.updateRpcRequest(RpcRequest).void requestContentPreview(String requestContentPreview)
RequestOnlyLog.requestContentPreview().void deferRequestContent()
requestContent(Object, Object) even after
endRequest() is called.
Note, however, the request content is not set if endRequest(Throwable) was called.
void deferRequestContentPreview()
requestContentPreview(String) even after
endRequest() is called.
Note, however, the request content preview is not set if endRequest(Throwable) was called.
void requestTrailers(HttpHeaders requestTrailers)
RequestOnlyLog.requestTrailers().void endRequest()
Request information. This method sets the following properties:
void endRequest(Throwable requestCause)
Request information. This method sets the following properties:
requestCause - the cause of the failure.void endRequest(long requestEndTimeNanos)
Request information. This method sets the following properties:
requestEndTimeNanos - System.nanoTime() value when the request ended.void endRequest(Throwable requestCause, long requestEndTimeNanos)
Request information. This method sets the following properties:
requestCause - the cause of the failure.requestEndTimeNanos - System.nanoTime() value when the request ended.void startResponse()
Response information. This method sets the following properties:
void startResponse(long responseStartTimeNanos,
long responseStartTimeMicros)
Response information. This method sets the following properties:
responseStartTimeNanos - System.nanoTime() value when the response started.responseStartTimeMicros - the number of microseconds since the epoch,
e.g. System.currentTimeMillis() * 1000.void increaseResponseLength(long deltaBytes)
RequestLog.responseLength() by deltaBytes.void increaseResponseLength(HttpData data)
void responseLength(long responseLength)
RequestLog.responseLength().void responseFirstBytesTransferred()
void responseFirstBytesTransferred(long responseFirstBytesTransferredNanos)
RequestLog.responseFirstBytesTransferredTimeNanos() with the specified timestamp.void responseHeaders(ResponseHeaders responseHeaders)
RequestLog.responseHeaders().void responseContent(Object responseContent, Object rawResponseContent)
RequestLog.responseContent() and the RequestLog.rawResponseContent().void responseContentPreview(String responseContentPreview)
RequestLog.responseContentPreview().void deferResponseContent()
responseContent(Object, Object) even after
endResponse() is called.
Note, however, the response content is not set if endResponse(Throwable) was called.
void deferResponseContentPreview()
responseContentPreview(String) even after
endResponse() is called.
Note, however, the response content preview is not set if endResponse(Throwable) was called.
void responseTrailers(HttpHeaders responseTrailers)
RequestLog.responseTrailers().void endResponse()
Response information. If a Throwable cause has been set
with responseContent(Object, Object), it will be treated as the responseCause for this
log. This method sets the following properties:
void endResponse(Throwable responseCause)
Response information. This method sets the following properties:
responseCause - the cause of the failure.void endResponse(long responseEndTimeNanos)
Response information. If a Throwable cause has been set
with responseContent(Object, Object), it will be treated as the responseCause for this
log. This method sets the following properties:
responseEndTimeNanos - System.nanoTime() value when the response ended.void endResponse(Throwable responseCause, long responseEndTimeNanos)
Response information. This method sets the following properties:
responseCause - the cause of the failure.responseEndTimeNanos - System.nanoTime() value when the response ended.void addChild(RequestLogAccess child)
RequestLogAccess so that the logs are propagated from the child.
Note that only the request-side logs of the first added child will be propagated. To fill the
response-side logs you need to call endResponseWithLastChild().void endResponseWithLastChild()
Copyright © 2020 LeanCloud. All rights reserved.