@Stability.Volatile public interface RequestTracer
RequestTracer
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.
Modifier and Type | Field and 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.
|
Modifier and Type | Method and 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.
|
static final String DISPATCH_SPAN_NAME
static final String PAYLOAD_ENCODING_SPAN_NAME
static final String SERVICE_IDENTIFIER_KV
static final String SERVICE_IDENTIFIER_QUERY
static final String SERVICE_IDENTIFIER_SEARCH
static final String SERVICE_IDENTIFIER_VIEW
static final String SERVICE_IDENTIFIER_ANALYTICS
InternalSpan internalSpan(String operationName, RequestSpan parent)
operationName
- the name of the toplevel operation (i.e. "get")parent
- the parent, can be null.RequestSpan requestSpan(String operationName, RequestSpan parent)
operationName
- the name of the toplevel operation (i.e. "get")parent
- a possible parent.Mono<Void> start()
Copyright © 2020 Couchbase, Inc.. All rights reserved.