Class OpenTracingRequestSpan
java.lang.Object
com.couchbase.client.tracing.opentracing.OpenTracingRequestSpan
- All Implemented Interfaces:
RequestSpan
public class OpenTracingRequestSpan extends Object implements RequestSpan
Wraps an OpenTracing span, ready to be passed in into options for each operation into the SDK as a parent.
-
Method Summary
Modifier and Type Method Description void
attribute(String key, boolean value)
void
attribute(String key, long value)
void
attribute(String key, String value)
void
end()
void
event(String name, Instant timestamp)
void
requestContext(RequestContext requestContext)
io.opentracing.Span
span()
Returns the wrapped OpenTracing span.static OpenTracingRequestSpan
wrap(io.opentracing.Tracer tracer, io.opentracing.Span span)
Wraps an OpenTracing span so that it can be passed in to the SDK-operation options as a parent.
-
Method Details
-
wrap
Wraps an OpenTracing span so that it can be passed in to the SDK-operation options as a parent.- Parameters:
span
- the span that should act as the parent.- Returns:
- the created wrapped span.
-
span
public io.opentracing.Span span()Returns the wrapped OpenTracing span. -
attribute
- Specified by:
attribute
in interfaceRequestSpan
-
attribute
- Specified by:
attribute
in interfaceRequestSpan
-
attribute
- Specified by:
attribute
in interfaceRequestSpan
-
event
- Specified by:
event
in interfaceRequestSpan
-
end
public void end()- Specified by:
end
in interfaceRequestSpan
-
requestContext
- Specified by:
requestContext
in interfaceRequestSpan
-