public class ThresholdRequestTracer extends Object implements RequestTracer
Modifier and Type | Class and Description |
---|---|
static class |
ThresholdRequestTracer.Builder
The builder used to configure the
ThresholdRequestTracer . |
DISPATCH_SPAN_NAME, PAYLOAD_ENCODING_SPAN_NAME, SERVICE_IDENTIFIER_ANALYTICS, SERVICE_IDENTIFIER_KV, SERVICE_IDENTIFIER_QUERY, SERVICE_IDENTIFIER_SEARCH, SERVICE_IDENTIFIER_VIEW
Modifier and Type | Method and Description |
---|---|
static ThresholdRequestTracer.Builder |
builder(EventBus eventBus)
Creates a builder to customize this tracer.
|
static ThresholdRequestTracer |
create(EventBus eventBus)
Short-hand to create the tracer with the event bus that needs to be used.
|
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.
|
public static ThresholdRequestTracer.Builder builder(EventBus eventBus)
eventBus
- the event bus where the final events will be emitted into.public static ThresholdRequestTracer create(EventBus eventBus)
eventBus
- the event bus where the final events will be emitted into.public InternalSpan internalSpan(String operationName, RequestSpan parent)
RequestTracer
internalSpan
in interface RequestTracer
operationName
- the name of the toplevel operation (i.e. "get")parent
- the parent, can be null.public RequestSpan requestSpan(String operationName, RequestSpan parent)
RequestTracer
requestSpan
in interface RequestTracer
operationName
- the name of the toplevel operation (i.e. "get")parent
- a possible parent.public Mono<Void> start()
RequestTracer
start
in interface RequestTracer
public Mono<Void> stop(Duration timeout)
RequestTracer
stop
in interface RequestTracer
Copyright © 2020 Couchbase, Inc.. All rights reserved.