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.
Extractor of the
SpanKind. In most cases, the span kind will be constant for server or
client requests, but you may need to implement a custom SpanKindExtractor if a framework
can generate different kinds of spans, for example both HTTP and messaging spans.-
Method Summary
Modifier and TypeMethodDescriptionstatic <REQUEST> SpanKindExtractor<REQUEST>Returns aSpanNameExtractorwhich always returnsSpanKind.CLIENT.static <REQUEST> SpanKindExtractor<REQUEST>Returns aSpanNameExtractorwhich always returnsSpanKind.CONSUMER.static <REQUEST> SpanKindExtractor<REQUEST>Returns aSpanNameExtractorwhich always returnsSpanKind.INTERNAL.static <REQUEST> SpanKindExtractor<REQUEST>Returns aSpanNameExtractorwhich always returnsSpanKind.PRODUCER.static <REQUEST> SpanKindExtractor<REQUEST>Returns aSpanNameExtractorwhich always returnsSpanKind.SERVER.io.opentelemetry.api.trace.SpanKindReturns theSpanKindcorresponding to theSpanKindExtractor.
-
Method Details
-
extract
Returns theSpanKindcorresponding to theSpanKindExtractor. -
alwaysInternal
Returns aSpanNameExtractorwhich always returnsSpanKind.INTERNAL. -
alwaysClient
Returns aSpanNameExtractorwhich always returnsSpanKind.CLIENT. -
alwaysServer
Returns aSpanNameExtractorwhich always returnsSpanKind.SERVER. -
alwaysProducer
Returns aSpanNameExtractorwhich always returnsSpanKind.PRODUCER. -
alwaysConsumer
Returns aSpanNameExtractorwhich always returnsSpanKind.CONSUMER.
-