public interface SpanObserver
Span.
Note: All of these callback functions are called after the associated operation has been performed on the
Span, i.e. they are post-change notifications.
| Modifier and Type | Method and Description |
|---|---|
void |
onFinish(SpanData spanData,
long finishMicros)
Notifies the observer that a span associated with the supplied data has finished.
|
void |
onLog(SpanData spanData,
long timestampMicroseconds,
Map<String,?> fields)
Notifies the observer that a log event has been recorded.
|
void |
onLog(SpanData spanData,
long timestampMicroseconds,
String event)
Notifies the observer that a log event has been recorded.
|
void |
onSetBaggageItem(SpanData spanData,
String key,
String value)
Notifies the observer that the named baggage item has been set/changed.
|
void |
onSetOperationName(SpanData spanData,
String operationName)
Notifies the observer that the operation name has been changed.
|
void |
onSetTag(SpanData spanData,
String key,
Object value)
Notifies the observer that the tag with the supplied key has been set or updated
on a
Span. |
void onSetOperationName(SpanData spanData, String operationName)
spanData - The data for the spanoperationName - The new operation namevoid onSetTag(SpanData spanData, String key, Object value)
Span.spanData - The data for the spankey - The tag keyvalue - The tag valuevoid onSetBaggageItem(SpanData spanData, String key, String value)
spanData - The data for the spankey - The baggage keyvalue - The baggage valuevoid onLog(SpanData spanData, long timestampMicroseconds, Map<String,?> fields)
spanData - The data for the spantimestampMicroseconds - The explicit timestamp for the log record. Must be greater than or equal to the
Span's start timestamp.fields - key:value log fields. Tracer implementations should support String, numeric, and boolean values;
some may also support arbitrary Objects.void onLog(SpanData spanData, long timestampMicroseconds, String event)
spanData - The data for the spantimestampMicroseconds - The explicit timestamp for the log record. Must be greater than or equal to the
Span's start timestamp.event - the event value; often a stable identifier for a moment in the Span lifecyclevoid onFinish(SpanData spanData, long finishMicros)
spanData - The data for the spanfinishMicros - The finish time in microsecondsCopyright © 2017–2018 OpenTracing. All rights reserved.