public static class NoOpSpanFactory.NoOpSpan extends Object implements Span
Constructor and Description |
---|
NoOpSpan() |
Modifier and Type | Method and Description |
---|---|
void |
end()
Ends the span.
|
SpanScope |
makeCurrent()
Sets the Span as the current for the current thread.
|
Span |
recordException(Throwable t)
Records an exception to the span.
|
Span |
start()
Starts the Span.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
run, runCallable, runConsumer, runSupplier, wrapCallable, wrapConsumer, wrapRunnable, wrapSupplier
public Span start()
Span
Span.makeCurrent()
in
order to do so.public SpanScope makeCurrent()
Span
SpanScope
must be closed before ending
the Span, on the same thread, or through a try-with-resources statement in the same thread as this method was
called.
You can make a span current on as many threads as you like, but you have to close every SpanScope
, or
context will leak into the current thread. Note that if this is neglected, the Span.end()
method should warn
the user in order to report this back to the framework.
makeCurrent
in interface Span
public void end()
Span
If scopes are still open when this method is called, either an exception should be thrown or an error log should be produced to warn the user of the leak. This information can then be reported back to the developers of the framework for a fix.
public Span recordException(Throwable t)
Span
recordException
in interface Span
t
- The exception to recordCopyright © 2010–2023. All rights reserved.