@Stability.Volatile public interface RequestSpan
Note that you'll most likely consume this interface through actual implementations from the tracer module that is used for your application. You will not need to worry about this with the default threshold request tracer, but if you are using OpenTracing or OpenTelemetry, look in their respective modules for implementations of this class.
Modifier and Type | Method and Description |
---|---|
void |
addEvent(String name,
Instant timestamp)
Sets an event on the span, which is translated to the corresponding implementation specific event.
|
void |
end()
Completes this span.
|
void |
requestContext(RequestContext requestContext)
Allows to set a request context to the request span.
|
void |
setAttribute(String key,
String value)
Sets an attribute on the span, which is translated to the corresponding implementation specific tag.
|
void setAttribute(String key, String value)
Note that, depending on the implementation, attributes might be ignored.
key
- the key of the attribute.value
- the value of the attribute.void addEvent(String name, Instant timestamp)
Note that, depending on the implementation, events might be ignored.
name
- the name of the eventtimestamp
- the timestamp when it happened.void end()
tracer
- the tracer with the help of which it will be completed.@Stability.Internal void requestContext(RequestContext requestContext)
requestContext
- the request context, if present.Copyright © 2021 Couchbase, Inc.. All rights reserved.