public final class BraveSpan extends Object implements io.opentracing.Span
This type also includes hooks to integrate with the underlying Tracer. Ex
you can access the underlying span with unwrap()
Operations to add data to the span are ignored once finish() or finish(long) are called.
| Modifier and Type | Method and Description |
|---|---|
BraveSpanContext |
context() |
void |
finish() |
void |
finish(long finishMicros) |
String |
getBaggageItem(String key)
Returns null unless
ExtraFieldPropagation is in use |
BraveSpan |
log(long timestampMicroseconds,
Map<String,?> fields) |
BraveSpan |
log(long timestampMicroseconds,
String event) |
BraveSpan |
log(Map<String,?> fields) |
BraveSpan |
log(String event) |
BraveSpan |
setBaggageItem(String key,
String value)
This is a NOOP unless
ExtraFieldPropagation is in use |
BraveSpan |
setOperationName(String operationName) |
BraveSpan |
setTag(String key,
boolean value) |
BraveSpan |
setTag(String key,
Number value)
Note:If the key is Tags.SAMPLING_PRIORITY and the value is zero, the
current span will be abandoned and future references to the
context() will be
unsampled. |
BraveSpan |
setTag(String key,
String value) |
brave.Span |
unwrap()
Returns wrapped Span
|
public final brave.Span unwrap()
public BraveSpanContext context()
context in interface io.opentracing.Spanpublic BraveSpan setTag(String key, String value)
setTag in interface io.opentracing.Spanpublic BraveSpan setTag(String key, boolean value)
setTag in interface io.opentracing.Spanpublic BraveSpan setTag(String key, Number value)
context() will be
unsampled. This does not affect the active span, nor does it affect any equivalent instances of
this object. This is a best efforts means to handle late sampling decisions.setTag in interface io.opentracing.Spanpublic BraveSpan log(long timestampMicroseconds, Map<String,?> fields)
log in interface io.opentracing.Spanpublic BraveSpan log(long timestampMicroseconds, String event)
log in interface io.opentracing.Spanpublic BraveSpan setBaggageItem(String key, String value)
ExtraFieldPropagation is in usesetBaggageItem in interface io.opentracing.Spanpublic String getBaggageItem(String key)
ExtraFieldPropagation is in usegetBaggageItem in interface io.opentracing.Spanpublic BraveSpan setOperationName(String operationName)
setOperationName in interface io.opentracing.Spanpublic void finish()
finish in interface io.opentracing.Spanpublic void finish(long finishMicros)
finish in interface io.opentracing.SpanCopyright © 2016–2018 OpenZipkin. All rights reserved.