Interface SpanKindExtractor<REQUEST>
-
- 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 SpanKindExtractor<REQUEST>
Extractor orSpanKind. In most cases, the span kind will be constant for server or client requests, but you may need to implement a customSpanKindExtractorif a framework can generate different kinds of spans, for example both HTTP and messaging spans.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <REQUEST> SpanKindExtractor<REQUEST>alwaysClient()Returns aSpanNameExtractorwhich always returnsSpanKind.CLIENT.static <REQUEST> SpanKindExtractor<REQUEST>alwaysInternal()Returns aSpanNameExtractorwhich always returnsSpanKind.INTERNAL.static <REQUEST> SpanKindExtractor<REQUEST>alwaysServer()Returns aSpanNameExtractorwhich always returnsSpanKind.SERVER.io.opentelemetry.api.trace.SpanKindextract(REQUEST request)Returns theSpanKindcorresponding to theSpanKindExtractor.
-
-
-
Method Detail
-
alwaysInternal
static <REQUEST> SpanKindExtractor<REQUEST> alwaysInternal()
Returns aSpanNameExtractorwhich always returnsSpanKind.INTERNAL.
-
alwaysClient
static <REQUEST> SpanKindExtractor<REQUEST> alwaysClient()
Returns aSpanNameExtractorwhich always returnsSpanKind.CLIENT.
-
alwaysServer
static <REQUEST> SpanKindExtractor<REQUEST> alwaysServer()
Returns aSpanNameExtractorwhich always returnsSpanKind.SERVER.
-
extract
io.opentelemetry.api.trace.SpanKind extract(REQUEST request)
Returns theSpanKindcorresponding to theSpanKindExtractor.
-
-