public interface RequestLog extends RequestOnlyLog
| Modifier and Type | Method and Description |
|---|---|
static RequestLogBuilder |
builder(RequestContext ctx)
Returns a newly created
RequestLogBuilder. |
Object |
rawResponseContent()
Returns the low-level content object of the
Response, which is specific
to the SerializationFormat. |
Throwable |
responseCause()
Returns the cause of response processing failure.
|
Object |
responseContent()
Returns the high-level content object of the
Response, which is specific
to the SerializationFormat. |
String |
responseContentPreview()
Returns the preview of response content of the
Response. |
default long |
responseDurationNanos()
Returns the duration that was taken to consume or produce the response completely, in nanoseconds.
|
long |
responseEndTimeNanos()
Returns the time when the processing of the response finished, in nanoseconds.
|
Long |
responseFirstBytesTransferredTimeNanos()
Returns the time when the first bytes of the response headers were transferred over the wire.
|
ResponseHeaders |
responseHeaders()
Returns the non-informational status
ResponseHeaders. |
long |
responseLength()
Returns the length of the response content.
|
long |
responseStartTimeMicros()
Returns the time when the processing of the response started, in microseconds since the epoch.
|
long |
responseStartTimeMillis()
Returns the time when the processing of the response started, in milliseconds since the epoch.
|
long |
responseStartTimeNanos()
Returns the time when the processing of the response started, in nanoseconds.
|
HttpHeaders |
responseTrailers()
Returns the HTTP trailers of the
Response. |
default String |
toStringResponseOnly()
Returns the string representation of the
Response, with no sanitization of headers or content. |
default String |
toStringResponseOnly(Function<? super HttpHeaders,?> headersSanitizer,
Function<Object,?> contentSanitizer)
Returns the string representation of the
Response. |
String |
toStringResponseOnly(Function<? super ResponseHeaders,?> headersSanitizer,
Function<Object,?> contentSanitizer,
Function<? super HttpHeaders,?> trailersSanitizer)
Returns the string representation of the
Response. |
default long |
totalDurationNanos()
|
channel, connectionTimings, name, rawRequestContent, requestCause, requestContent, requestContentPreview, requestDurationNanos, requestEndTimeNanos, requestFirstBytesTransferredTimeNanos, requestHeaders, requestLength, requestStartTimeMicros, requestStartTimeMillis, requestStartTimeNanos, requestTrailers, scheme, sessionProtocol, sslSession, toStringRequestOnly, toStringRequestOnly, toStringRequestOnlyavailabilityStamp, children, context, ensureAvailable, ensureAvailable, ensureAvailable, ensureComplete, ensureRequestComplete, isAvailable, isAvailable, isAvailable, isComplete, isRequestComplete, partial, whenAvailable, whenAvailable, whenAvailable, whenComplete, whenRequestCompletestatic RequestLogBuilder builder(RequestContext ctx)
RequestLogBuilder.long responseStartTimeMicros()
RequestLogAvailabilityException - if the property is not available yet.RequestLogProperty.RESPONSE_START_TIMElong responseStartTimeMillis()
RequestLogAvailabilityException - if the property is not available yet.RequestLogProperty.RESPONSE_START_TIMElong responseStartTimeNanos()
RequestLogAvailabilityException - if the property is not available yet.RequestLogProperty.RESPONSE_START_TIMELong responseFirstBytesTransferredTimeNanos()
null if nothing was transferred.RequestLogAvailabilityException - if the property is not available yet.RequestLogProperty.RESPONSE_FIRST_BYTES_TRANSFERRED_TIMElong responseEndTimeNanos()
RequestLogAvailabilityException - if the property is not available yet.RequestLogProperty.RESPONSE_END_TIMEdefault long responseDurationNanos()
RequestLogAvailabilityException - if the property is not available yet.RequestLogProperty.RESPONSE_END_TIMEdefault long totalDurationNanos()
Request processing started and until the
Response processing ended. This property is available only when both
RequestLogProperty.REQUEST_START_TIME and RequestLogProperty.RESPONSE_START_TIME are
available.RequestLogAvailabilityException - if the property is not available yet.RequestLogProperty.RESPONSE_END_TIMElong responseLength()
RequestLogAvailabilityException - if the property is not available yet.RequestLogProperty.RESPONSE_LENGTHThrowable responseCause()
null if the response was processed completely.RequestLogAvailabilityException - if the property is not available yet.RequestLogProperty.RESPONSE_CAUSEResponseHeaders responseHeaders()
ResponseHeaders.
If the Response was not received or sent at all, it will return a dummy
ResponseHeaders whose :status is "0".RequestLogAvailabilityException - if the property is not available yet.RequestLogProperty.RESPONSE_HEADERSObject responseContent()
Response, which is specific
to the SerializationFormat.RpcResponse for RPC, or null for othersRequestLogAvailabilityException - if the property is not available yet.RequestLogProperty.RESPONSE_CONTENTObject rawResponseContent()
Response, which is specific
to the SerializationFormat.ThriftReply for Thrift, or null for othersRequestLogAvailabilityException - if the property is not available yet.RequestLogProperty.RESPONSE_CONTENTString responseContentPreview()
Response.
Note that a Service or a Client must be decorated with ContentPreviewingService
or ContentPreviewingClient decorators respectively to enable the content preview.null if preview is disabled.RequestLogAvailabilityException - if the property is not available yet.RequestLogProperty.RESPONSE_CONTENT_PREVIEWHttpHeaders responseTrailers()
Response.RequestLogAvailabilityException - if the property is not available yet.RequestLogProperty.RESPONSE_TRAILERSdefault String toStringResponseOnly()
Response, with no sanitization of headers or content.
This method is a shortcut for:
toStringResponseOnly(Function.identity(), Function.identity(), Function.identity());
default String toStringResponseOnly(Function<? super HttpHeaders,?> headersSanitizer, Function<Object,?> contentSanitizer)
Response. This method is a shortcut for:
toStringResponseOnly(headersSanitizer, contentSanitizer, headersSanitizer);
String toStringResponseOnly(Function<? super ResponseHeaders,?> headersSanitizer, Function<Object,?> contentSanitizer, Function<? super HttpHeaders,?> trailersSanitizer)
Response.headersSanitizer - a Function for sanitizing HTTP headers for logging. The result of the
Function is what is actually logged as headers.contentSanitizer - a Function for sanitizing response content for logging. The result of the
Function is what is actually logged as content.trailersSanitizer - a Function for sanitizing HTTP trailers for logging. The result of the
Function is what is actually logged as trailers.Copyright © 2020 LeanCloud. All rights reserved.