Package com.couchbase.client.core.cnc
Interface RequestTracer
-
- All Known Implementing Classes:
NoopRequestTracer
,ThresholdRequestTracer
@Volatile public interface RequestTracer
TheRequestTracer
describes the tracing abstraction in the SDK.Various implementations exist, both as part of the core library but also as external modules that can be attached (i.e. for OpenTracing and OpenTelemetry). It is recommended to use those modules and not write your own tracer unless absolutely needed.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DISPATCH_SPAN_NAME
A common name for the dispatch span that implementations should use.static String
PAYLOAD_ENCODING_SPAN_NAME
A common name for the value encode span that implementations should use.static String
SERVICE_IDENTIFIER_ANALYTICS
The identifier commonly used to identify the analytics service.static String
SERVICE_IDENTIFIER_KV
The identifier commonly used to identify the kv service.static String
SERVICE_IDENTIFIER_QUERY
The identifier commonly used to identify the query service.static String
SERVICE_IDENTIFIER_SEARCH
The identifier commonly used to identify the search service.static String
SERVICE_IDENTIFIER_VIEW
The identifier commonly used to identify the view service.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InternalSpan
internalSpan(String operationName, RequestSpan parent)
Creates a new span that represents a full request/response lifecycle in the SDK.RequestSpan
requestSpan(String operationName, RequestSpan parent)
Creates a new span that is created from the underlying tracer.Mono<Void>
start()
Starts the tracer if it hasn't been started, might be a noop depending on the implementation.Mono<Void>
stop(Duration timeout)
Stops the tracer if it has been started previously, might be a noop depending on the implementation.
-
-
-
Field Detail
-
DISPATCH_SPAN_NAME
static final String DISPATCH_SPAN_NAME
A common name for the dispatch span that implementations should use.- See Also:
- Constant Field Values
-
PAYLOAD_ENCODING_SPAN_NAME
static final String PAYLOAD_ENCODING_SPAN_NAME
A common name for the value encode span that implementations should use.- See Also:
- Constant Field Values
-
SERVICE_IDENTIFIER_KV
static final String SERVICE_IDENTIFIER_KV
The identifier commonly used to identify the kv service.- See Also:
- Constant Field Values
-
SERVICE_IDENTIFIER_QUERY
static final String SERVICE_IDENTIFIER_QUERY
The identifier commonly used to identify the query service.- See Also:
- Constant Field Values
-
SERVICE_IDENTIFIER_SEARCH
static final String SERVICE_IDENTIFIER_SEARCH
The identifier commonly used to identify the search service.- See Also:
- Constant Field Values
-
SERVICE_IDENTIFIER_VIEW
static final String SERVICE_IDENTIFIER_VIEW
The identifier commonly used to identify the view service.- See Also:
- Constant Field Values
-
SERVICE_IDENTIFIER_ANALYTICS
static final String SERVICE_IDENTIFIER_ANALYTICS
The identifier commonly used to identify the analytics service.- See Also:
- Constant Field Values
-
-
Method Detail
-
internalSpan
InternalSpan internalSpan(String operationName, RequestSpan parent)
Creates a new span that represents a full request/response lifecycle in the SDK.- Parameters:
operationName
- the name of the toplevel operation (i.e. "get")parent
- the parent, can be null.- Returns:
- an internal span representing the toplevel request.
-
requestSpan
RequestSpan requestSpan(String operationName, RequestSpan parent)
Creates a new span that is created from the underlying tracer.- Parameters:
operationName
- the name of the toplevel operation (i.e. "get")parent
- a possible parent.- Returns:
- a request span that wraps the actual tracer implementation span.
-
start
Mono<Void> start()
Starts the tracer if it hasn't been started, might be a noop depending on the implementation.
-
-