public static enum TraceProvider.NoOp extends java.lang.Enum<TraceProvider.NoOp> implements TraceProvider
TraceProvider.NoOp| Enum Constant and Description |
|---|
INSTANCE |
| 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.
|
static TraceProvider.NoOp |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static TraceProvider.NoOp[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TraceProvider.NoOp INSTANCE
public static TraceProvider.NoOp[] values()
for (TraceProvider.NoOp c : TraceProvider.NoOp.values()) System.out.println(c);
public static TraceProvider.NoOp valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic java.io.Closeable startSpan(java.lang.String spanName)
TraceProviderEnters 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.
startSpan in interface TraceProviderspanName - the name of the returned kamon.trace.SpanSpan will be set to the current Context
kamon.trace.Tracer#buildSpan(java.lang.String)public void finishSpan(java.io.Closeable scope,
java.lang.Throwable throwable)
TraceProviderfinishSpan in interface TraceProviderscope - an object representing the scopethrowable - an optional Throwable