public class NoopRequestSpan extends Object implements RequestSpan
NoopRequestTracer
.
Calling individual methods on this span won't do anything, since, well, it's a noop.
Modifier and Type | Field and Description |
---|---|
static NoopRequestSpan |
INSTANCE
Holds a single, static representation of this span.
|
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,
boolean value)
Sets an attribute on the span, which is translated to the corresponding implementation specific tag.
|
void |
setAttribute(String key,
long value)
Sets an attribute on the span, which is translated to the corresponding implementation specific tag.
|
void |
setAttribute(String key,
String value)
Sets an attribute on the span, which is translated to the corresponding implementation specific tag.
|
public static final NoopRequestSpan INSTANCE
public void setAttribute(String key, String value)
RequestSpan
Note that, depending on the implementation, attributes might be ignored.
setAttribute
in interface RequestSpan
key
- the key of the attribute.value
- the value of the attribute.public void setAttribute(String key, boolean value)
RequestSpan
Note that, depending on the implementation, attributes might be ignored.
setAttribute
in interface RequestSpan
key
- the key of the attribute.value
- the value of the attribute.public void setAttribute(String key, long value)
RequestSpan
Note that, depending on the implementation, attributes might be ignored.
setAttribute
in interface RequestSpan
key
- the key of the attribute.value
- the value of the attribute.public void addEvent(String name, Instant timestamp)
RequestSpan
Note that, depending on the implementation, events might be ignored.
addEvent
in interface RequestSpan
name
- the name of the eventtimestamp
- the timestamp when it happened.public void end()
RequestSpan
end
in interface RequestSpan
public void requestContext(RequestContext requestContext)
RequestSpan
requestContext
in interface RequestSpan
requestContext
- the request context, if present.Copyright © 2021 Couchbase, Inc.. All rights reserved.