Interface SpanStatusExtractor<REQUEST,RESPONSE>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Extractor of
StatusCode
. The extract(SpanStatusBuilder, Object, Object, Throwable)
method will be called after a request processing is completed to determine its final
status.-
Method Summary
Modifier and TypeMethodDescriptionvoid
extract
(SpanStatusBuilder spanStatusBuilder, REQUEST request, RESPONSE response, Throwable error) Extracts the status from the response and sets it to thespanStatusBuilder
.static <REQUEST,
RESPONSE>
SpanStatusExtractor<REQUEST,RESPONSE> Returns the defaultSpanStatusExtractor
, which returnsStatusCode.ERROR
if the framework returned an unhandled exception, orStatusCode.UNSET
otherwise.
-
Method Details
-
extract
void extract(SpanStatusBuilder spanStatusBuilder, REQUEST request, @Nullable RESPONSE response, @Nullable Throwable error) Extracts the status from the response and sets it to thespanStatusBuilder
. -
getDefault
Returns the defaultSpanStatusExtractor
, which returnsStatusCode.ERROR
if the framework returned an unhandled exception, orStatusCode.UNSET
otherwise.
-