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.
@FunctionalInterface public interface SpanStatusExtractor<REQUEST,RESPONSE>
Extractor ofStatusCode, which will be called after a request and response is completed to determine its final status.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description io.opentelemetry.api.trace.StatusCodeextract(REQUEST request, RESPONSE response, @Nullable Throwable error)Returns theStatusCode.static <REQUEST,RESPONSE>
SpanStatusExtractor<REQUEST,RESPONSE>getDefault()Returns the defaultSpanStatusExtractor, which returnsStatusCode.ERRORif the framework returned an unhandled exception, orStatusCode.UNSETotherwise.static <REQUEST,RESPONSE>
SpanStatusExtractor<REQUEST,RESPONSE>http(HttpAttributesExtractor<REQUEST,RESPONSE> attributesExtractor)Returns theSpanStatusExtractorfor HTTP requests, which will use the HTTP status code to determine theStatusCodeif available or fallback to the default status otherwise.
-
-
-
Method Detail
-
getDefault
static <REQUEST,RESPONSE> SpanStatusExtractor<REQUEST,RESPONSE> getDefault()
Returns the defaultSpanStatusExtractor, which returnsStatusCode.ERRORif the framework returned an unhandled exception, orStatusCode.UNSETotherwise.
-
http
static <REQUEST,RESPONSE> SpanStatusExtractor<REQUEST,RESPONSE> http(HttpAttributesExtractor<REQUEST,RESPONSE> attributesExtractor)
Returns theSpanStatusExtractorfor HTTP requests, which will use the HTTP status code to determine theStatusCodeif available or fallback to the default status otherwise.
-
-