Package fish.payara.opentracing
Class PayaraRequestTracingProcessor
- java.lang.Object
-
- fish.payara.opentracing.PayaraRequestTracingProcessor
-
- All Implemented Interfaces:
io.opentelemetry.sdk.trace.SpanProcessor
,Closeable
,AutoCloseable
public class PayaraRequestTracingProcessor extends Object implements io.opentelemetry.sdk.trace.SpanProcessor
Maps OpenTelemetry spans to Payara Tracing Spans. The models are quite different, OTEL one being much more precise. In order to keep Payara Tracing running, we feed it with following data:- Sampled root spans, and propagated spans are created as root spans in tracing service.
- Payara spans are created with parent reference to OTEL spans
- non-root spans are traced as "request spans", which should make them included in current trace
-
-
Constructor Summary
Constructors Constructor Description PayaraRequestTracingProcessor(RequestTracingService requestTracingService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isEndRequired()
boolean
isStartRequired()
void
onEnd(io.opentelemetry.sdk.trace.ReadableSpan span)
void
onStart(io.opentelemetry.context.Context parentContext, io.opentelemetry.sdk.trace.ReadWriteSpan span)
-
-
-
Constructor Detail
-
PayaraRequestTracingProcessor
public PayaraRequestTracingProcessor(RequestTracingService requestTracingService)
-
-
Method Detail
-
onStart
public void onStart(io.opentelemetry.context.Context parentContext, io.opentelemetry.sdk.trace.ReadWriteSpan span)
- Specified by:
onStart
in interfaceio.opentelemetry.sdk.trace.SpanProcessor
-
isStartRequired
public boolean isStartRequired()
- Specified by:
isStartRequired
in interfaceio.opentelemetry.sdk.trace.SpanProcessor
-
onEnd
public void onEnd(io.opentelemetry.sdk.trace.ReadableSpan span)
- Specified by:
onEnd
in interfaceio.opentelemetry.sdk.trace.SpanProcessor
-
isEndRequired
public boolean isEndRequired()
- Specified by:
isEndRequired
in interfaceio.opentelemetry.sdk.trace.SpanProcessor
-
-