Class OpenTelemetryTracer
- java.lang.Object
-
- com.spotify.github.tracing.BaseTracer
-
- com.spotify.github.tracing.opentelemetry.OpenTelemetryTracer
-
- All Implemented Interfaces:
Tracer
public class OpenTelemetryTracer extends BaseTracer
Tracer implementation using OpenTelemetry.
-
-
Constructor Summary
Constructors Constructor Description OpenTelemetryTracer()
OpenTelemetryTracer(io.opentelemetry.api.OpenTelemetry openTelemetry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description okhttp3.Call.Factory
createTracedClient(okhttp3.OkHttpClient client)
protected Span
internalSpan(String path, String method, CompletionStage<?> future)
Create a new span for the given path and method.protected Span
internalSpan(okhttp3.Request request, CompletionStage<?> future)
Create a new span for the given request.-
Methods inherited from class com.spotify.github.tracing.BaseTracer
attachSpanToFuture, span, span, span, span
-
-
-
-
Method Detail
-
internalSpan
protected Span internalSpan(String path, String method, CompletionStage<?> future)
Create a new span for the given path and method.- Specified by:
internalSpan
in classBaseTracer
- Parameters:
path
- The path of the request.method
- The method of the request.future
- The future to attach the span to.- Returns:
- The created span.
-
internalSpan
protected Span internalSpan(okhttp3.Request request, CompletionStage<?> future)
Create a new span for the given request.- Specified by:
internalSpan
in classBaseTracer
- Parameters:
request
- The request to create a span for.future
- The future to attach the span to.- Returns:
- The created span.
-
createTracedClient
public okhttp3.Call.Factory createTracedClient(okhttp3.OkHttpClient client)
-
-