public interface Span extends AutoCloseable
Spans are created by the Tracer.buildSpan(java.lang.String)
interface.
Modifier and Type | Method and Description |
---|---|
void |
close() |
SpanContext |
context()
Retrieve the associated SpanContext.
|
void |
finish()
Sets the end timestamp and records the span.
|
Span |
log(long timestampMicroseconds,
String eventName,
Object payload)
Add a new log event to the Span, accepting an event name string and an optional structured payload argument.
|
Span |
log(String eventName,
Object payload)
Add a new log event to the Span, accepting an event name string and an optional structured payload argument.
|
Span |
setTag(String key,
boolean value)
Same as
setTag(String, String) , but for boolean values. |
Span |
setTag(String key,
Number value)
Same as
setTag(String, String) , but for numeric values. |
Span |
setTag(String key,
String value)
Set a key:value tag on the Span.
|
SpanContext context()
void finish()
This should be the last call made to any span instance, and to do otherwise leads to undefined behavior.
void close()
close
in interface AutoCloseable
Span setTag(String key, boolean value)
setTag(String, String)
, but for boolean values.Span setTag(String key, Number value)
setTag(String, String)
, but for numeric values.Span log(String eventName, Object payload)
Span log(long timestampMicroseconds, String eventName, Object payload)
Copyright © 2016 OpenTracing. All rights reserved.