public interface TraceProvider
| Modifier and Type | Interface and Description |
|---|---|
static class |
TraceProvider.NoOp |
| Modifier and Type | Method and Description |
|---|---|
void |
finishSpan(java.io.Closeable scope,
java.lang.Throwable throwable)
Ends the current span with a status derived from the given (optional) Throwable, and closes the
given scope.
|
java.io.Closeable |
startSpan(java.lang.String spanName)
Starts a new span and sets it as the current span.
|
java.io.Closeable startSpan(java.lang.String spanName)
Enters the scope of code where the newly created Span is in the current Context, and
returns an object that represents that scope. When the returned object is closed, the scope is
exited, the previous Context is restored, and the newly created Span is ended using
kamon.trace.Span#finish.
Callers must eventually close the returned object to avoid leaking the Context.
NB: The return type of this method is intentionally Closeable and not the more
specific kamon.context.Storage.Scope because the latter would not be visible from
classes loaded by the bootstrap classloader.
spanName - the name of the returned kamon.trace.SpanSpan will be set to the current Context
kamon.trace.Tracer#buildSpan(java.lang.String)void finishSpan(java.io.Closeable scope,
java.lang.Throwable throwable)
scope - an object representing the scopethrowable - an optional Throwable