public class HystrixRequestLog
extends java.lang.Object
HystrixCommand
executions and events during the current request.Modifier and Type | Method and Description |
---|---|
java.util.Collection<HystrixInvokableInfo<?>> |
getAllExecutedCommands()
Retrieve
HystrixCommand instances that were executed during this HystrixRequestContext . |
static HystrixRequestLog |
getCurrentRequest()
HystrixRequestLog for current request as defined by HystrixRequestContext . |
static HystrixRequestLog |
getCurrentRequest(HystrixConcurrencyStrategy concurrencyStrategy)
HystrixRequestLog for current request as defined by HystrixRequestContext . |
java.util.Collection<HystrixCommand<?>> |
getExecutedCommands()
Deprecated.
|
java.lang.String |
getExecutedCommandsAsString()
Formats the log of executed commands into a string usable for logging purposes.
|
public static HystrixRequestLog getCurrentRequest(HystrixConcurrencyStrategy concurrencyStrategy)
HystrixRequestLog
for current request as defined by HystrixRequestContext
.HystrixRequestLog
public static HystrixRequestLog getCurrentRequest()
HystrixRequestLog
for current request as defined by HystrixRequestContext
.
NOTE: This uses the default HystrixConcurrencyStrategy
or global override. If an injected strategy is being used by commands you must instead use
getCurrentRequest(HystrixConcurrencyStrategy)
.
HystrixRequestLog
@Deprecated public java.util.Collection<HystrixCommand<?>> getExecutedCommands()
HystrixCommand
instances that were executed during this HystrixRequestContext
.Collection<HystrixCommand<?>>
public java.util.Collection<HystrixInvokableInfo<?>> getAllExecutedCommands()
HystrixCommand
instances that were executed during this HystrixRequestContext
.Collection<HystrixCommand<?>>
public java.lang.String getExecutedCommandsAsString()
Examples:
If a command has a multiplier such as x4
, that means this command was executed 4 times with the same events. The time in milliseconds is the sum of the 4 executions.
For example, TestCommand[SUCCESS][15ms]x4
represents TestCommand being executed 4 times and the sum of those 4 executions was 15ms. These 4 each executed the run() method since
RESPONSE_FROM_CACHE
was not present as an event.
If an EMIT or FALLBACK_EMIT has a multiplier such as x5
, that means a HystrixObservableCommand
was used and it emitted that number of OnNext
s.
For example, TestCommand[EMITx5, FAILURE, FALLBACK_EMITx6, FALLBACK_FAILURE][100ms]
represents TestCommand executing observably, emitted 5 OnNext
s, then an OnError
.
This command also has an Observable fallback, and it emits 6 OnNext
s, then an OnCompleted
.