Class NoopRequestTracer
- java.lang.Object
-
- com.couchbase.client.core.cnc.tracing.NoopRequestTracer
-
- All Implemented Interfaces:
RequestTracer
public class NoopRequestTracer extends Object implements RequestTracer
A simple NOOP implementation of the tracer, useful if tracing needs to be disabled completely.
-
-
Field Summary
Fields Modifier and Type Field Description static NoopRequestTracer
INSTANCE
Returns the static instance of this tracer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RequestSpan
requestSpan(String operationName, RequestSpan parent)
Creates a new request span with or without a parent.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
-
INSTANCE
public static final NoopRequestTracer INSTANCE
Returns the static instance of this tracer.
-
-
Method Detail
-
start
public Mono<Void> start()
Description copied from interface:RequestTracer
Starts the tracer if it hasn't been started, might be a noop depending on the implementation.- Specified by:
start
in interfaceRequestTracer
-
stop
public Mono<Void> stop(Duration timeout)
Description copied from interface:RequestTracer
Stops the tracer if it has been started previously, might be a noop depending on the implementation.- Specified by:
stop
in interfaceRequestTracer
-
requestSpan
public RequestSpan requestSpan(String operationName, RequestSpan parent)
Description copied from interface:RequestTracer
Creates a new request span with or without a parent.- Specified by:
requestSpan
in interfaceRequestTracer
- Parameters:
operationName
- the name of the toplevel operation (i.e. "cb.get")parent
- a parent, if no parent is used supply null.- Returns:
- a request span that wraps the actual tracer implementation span.
-
-