Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
Returns the cause of response processing failure.
Returns the preview of response content of the
Response
.
default long
Returns the duration that was taken to consume or produce the response completely, in nanoseconds.
long
Returns the time when the processing of the response finished, in nanoseconds.
Returns the time when the first bytes of the response headers were transferred over the wire.
long
Returns the length of the response content.
long
Returns the time when the processing of the response started, in microseconds since the epoch.
long
Returns the time when the processing of the response started, in milliseconds since the epoch.
long
Returns the time when the processing of the response started, in nanoseconds.
Returns the HTTP trailers of the
Response
.
default long
Returns the amount of time taken since the
Request
processing started and until the
Response
processing ended.
Methods inherited from interface com.linecorp.armeria.common.logging.RequestLogAccess
availabilityStamp , children , context , ensureAvailable , ensureAvailable , ensureAvailable , ensureComplete , ensureRequestComplete , getIfAvailable , getIfAvailable , isAvailable , isAvailable , isAvailable , isComplete , isRequestComplete , parent , partial , whenAvailable , whenAvailable , whenAvailable , whenComplete , whenRequestComplete
Methods inherited from interface com.linecorp.armeria.common.logging.RequestOnlyLog
authenticatedUser , channel , connectionTimings , fullName , name , rawRequestContent , requestCause , requestContent , requestContentPreview , requestDurationNanos , requestEndTimeNanos , requestFirstBytesTransferredTimeNanos , requestHeaders , requestLength , requestStartTimeMicros , requestStartTimeMillis , requestStartTimeNanos , requestTrailers , scheme , serializationFormat , serviceName , sessionProtocol , sslSession , toStringRequestOnly , toStringRequestOnly , toStringRequestOnly
Method Details
responseStartTimeMicros
long responseStartTimeMicros ()
Returns the time when the processing of the response started, in microseconds since the epoch.
Throws:
RequestLogAvailabilityException
- if the property is not available yet.
See Also:
responseStartTimeMillis
long responseStartTimeMillis ()
Returns the time when the processing of the response started, in milliseconds since the epoch.
Throws:
RequestLogAvailabilityException
- if the property is not available yet.
See Also:
responseStartTimeNanos
long responseStartTimeNanos ()
Returns the time when the processing of the response started, in nanoseconds. This value can only be
used to measure elapsed time and is not related to any other notion of system or wall-clock time.
Throws:
RequestLogAvailabilityException
- if the property is not available yet.
See Also:
responseFirstBytesTransferredTimeNanos
Returns the time when the first bytes of the response headers were transferred over the wire. For a
client, this is the time the client received the data, while for a server it is the time the server sent
them. This value can only be used to measure elapsed time and is not related to any other notion of
system or wall-clock time.
Returns:
the transfer time, or null
if nothing was transferred.
Throws:
RequestLogAvailabilityException
- if the property is not available yet.
See Also:
responseEndTimeNanos
long responseEndTimeNanos ()
Returns the time when the processing of the response finished, in nanoseconds. This value can only be
used to measure elapsed time and is not related to any other notion of system or wall-clock time.
Throws:
RequestLogAvailabilityException
- if the property is not available yet.
See Also:
responseDurationNanos
default long responseDurationNanos ()
Returns the duration that was taken to consume or produce the response completely, in nanoseconds.
Throws:
RequestLogAvailabilityException
- if the property is not available yet.
See Also:
responseLength
long responseLength ()
Returns the length of the response content.
Throws:
RequestLogAvailabilityException
- if the property is not available yet.
See Also:
responseCause
Returns the cause of response processing failure.
Returns:
the cause. null
if the response was processed completely.
Throws:
RequestLogAvailabilityException
- if the property is not available yet.
See Also:
responseContent
Returns:
RpcResponse
for RPC, or null
for others
Throws:
RequestLogAvailabilityException
- if the property is not available yet.
See Also:
rawResponseContent
Returns:
ThriftReply
for Thrift, or null
for others
Throws:
RequestLogAvailabilityException
- if the property is not available yet.
See Also:
responseContentPreview
Returns:
the preview, or null
if preview is disabled.
Throws:
RequestLogAvailabilityException
- if the property is not available yet.
See Also:
toStringResponseOnly
Deprecated.
Returns the string representation of the
Response
, with no sanitization of headers or content.
This method is a shortcut for:
toStringResponseOnly((ctx, headers) -> headers,
(ctx, content) -> content,
(ctx, trailers) -> trailers);
toStringResponseOnly
Deprecated.
Returns the string representation of the
Response
. This method is a shortcut for:
toStringResponseOnly(headersSanitizer, contentSanitizer, headersSanitizer);
Parameters:
headersSanitizer
- a BiFunction
for sanitizing HTTP headers for logging. The result of
the BiFunction
is what is actually logged as headers.
contentSanitizer
- a BiFunction
for sanitizing response content for logging. The result of
the BiFunction
is what is actually logged as content.
toStringResponseOnly
Deprecated.
Returns the string representation of the
Response
.
Parameters:
headersSanitizer
- a BiFunction
for sanitizing HTTP headers for logging. The result of
the BiFunction
is what is actually logged as headers.
contentSanitizer
- a BiFunction
for sanitizing response content for logging. The result of
the BiFunction
is what is actually logged as content.
trailersSanitizer
- a BiFunction
for sanitizing HTTP trailers for logging. The result of
the BiFunction
is what is actually logged as trailers.
LogFormatter.formatResponse(RequestLog)
instead.