public class NoopRequestSpan extends Object implements RequestSpan
NoopRequestTracer.
Calling individual methods on this span won't do anything, since, well, it's a noop.
RequestSpan.StatusCode| Modifier and Type | Field and Description |
|---|---|
static NoopRequestSpan |
INSTANCE
Holds a single, static representation of this span.
|
| Modifier and Type | Method and Description |
|---|---|
void |
attribute(String key,
boolean value)
Sets a high-cardinality attribute on the span, which is translated to the corresponding implementation specific tag.
|
void |
attribute(String key,
long value)
Sets a high-cardinality attribute on the span, which is translated to the corresponding implementation specific tag.
|
void |
attribute(String key,
String value)
Sets a high-cardinality attribute on the span, which is translated to the corresponding implementation specific tag.
|
void |
end()
Completes this span.
|
void |
event(String name,
Instant timestamp)
Sets an event on the span, which is translated to the corresponding implementation specific event.
|
void |
requestContext(RequestContext requestContext)
Allows to set a request context to the request span.
|
void |
status(RequestSpan.StatusCode status)
Sets the status of the span, which is by default UNSET.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitlowCardinalityAttribute, lowCardinalityAttribute, lowCardinalityAttribute, recordExceptionpublic static final NoopRequestSpan INSTANCE
public void attribute(String key, String value)
RequestSpanNote that, depending on the implementation, attributes might be ignored.
attribute in interface RequestSpankey - the key of the attribute.value - the value of the attribute.public void attribute(String key, boolean value)
RequestSpanNote that, depending on the implementation, attributes might be ignored.
attribute in interface RequestSpankey - the key of the attribute.value - the value of the attribute.public void attribute(String key, long value)
RequestSpanNote that, depending on the implementation, attributes might be ignored.
attribute in interface RequestSpankey - the key of the attribute.value - the value of the attribute.public void event(String name, Instant timestamp)
RequestSpanNote that, depending on the implementation, events might be ignored.
event in interface RequestSpanname - the name of the eventtimestamp - the timestamp when it happened.public void status(RequestSpan.StatusCode status)
RequestSpanNote that, depending on the implementation, this might be a no-op.
status in interface RequestSpanstatus - the span's new status.public void end()
RequestSpanend in interface RequestSpanpublic void requestContext(RequestContext requestContext)
RequestSpanrequestContext in interface RequestSpanrequestContext - the request context, if present.Copyright © 2024 Couchbase, Inc.. All rights reserved.