Package org.zalando.riptide
Class OriginalStackTracePlugin
java.lang.Object
org.zalando.riptide.OriginalStackTracePlugin
- All Implemented Interfaces:
Plugin
Preserves the original stack traces of failed requests. Requests in Riptide are executed asynchronously by default.
That has the unfortunate side-effect that stack traces from exceptions that happen when processing the response will
not contain everything that is needed to trace back to the caller.
This plugin will modify the stack trace of any thrown exception and appending the stack trace elements of the original stack trace
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Attribute<Supplier<StackTraceElement[]>>Attributethat allows to access the original stack trace, i.e. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaroundAsync(RequestExecution execution) The given execution will be executed in a different thread and therefore be properly asynchronous.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.zalando.riptide.Plugin
aroundDispatch, aroundNetwork, aroundSerialization
-
Field Details
-
STACK
Attributethat allows to access the original stack trace, i.e. the stack trace from the calling thread.
-
-
Constructor Details
-
OriginalStackTracePlugin
public OriginalStackTracePlugin()
-
-
Method Details
-
aroundAsync
Description copied from interface:PluginThe given execution will be executed in a different thread and therefore be properly asynchronous. This phase is useful for plugins which either need to perform some task in the calling thread or (more commonly) may trigger other asynchronous operations concurrently to the request.- Specified by:
aroundAsyncin interfacePlugin- Parameters:
execution- the execution that includes the thread switch as well as the dispatch, serialization and network phases- Returns:
- the new, potentially modified execution
-