Package brave.opentracing
Class BraveSpan
java.lang.Object
brave.opentracing.BraveSpan
- All Implemented Interfaces:
io.opentracing.Span
public final class BraveSpan
extends java.lang.Object
implements io.opentracing.Span
Holds the Span used by the underlying Tracer.
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.
-
Method Summary
Modifier and Type Method Description BraveSpanContextcontext()booleanequals(java.lang.Object o)voidfinish()voidfinish(long finishMicros)java.lang.StringgetBaggageItem(java.lang.String key)Returns null unlessBaggagePropagationis in useinthashCode()BraveSpanlog(long timestampMicroseconds, java.lang.String event)BraveSpanlog(long timestampMicroseconds, java.util.Map<java.lang.String,?> fields)BraveSpanlog(java.lang.String event)BraveSpanlog(java.util.Map<java.lang.String,?> fields)BraveSpansetBaggageItem(java.lang.String key, java.lang.String value)This is a NOOP unlessBaggagePropagationis in useBraveSpansetOperationName(java.lang.String operationName)<T> BraveSpansetTag(io.opentracing.tag.Tag<T> tag, T value)BraveSpansetTag(java.lang.String key, boolean value)BraveSpansetTag(java.lang.String key, java.lang.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 thecontext()will be unsampled.BraveSpansetTag(java.lang.String key, java.lang.String value)java.lang.StringtoString()brave.Spanunwrap()Returns wrapped Span
-
Method Details
-
unwrap
public final brave.Span unwrap()Returns wrapped Span -
context
- Specified by:
contextin interfaceio.opentracing.Span
-
setTag
- Specified by:
setTagin interfaceio.opentracing.Span
-
setTag
- Specified by:
setTagin interfaceio.opentracing.Span
-
setTag
Note:If the key is Tags.SAMPLING_PRIORITY and the value is zero, the current span will be abandoned and future references to thecontext()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.- Specified by:
setTagin interfaceio.opentracing.Span
-
setTag
- Specified by:
setTagin interfaceio.opentracing.Span
-
log
- Specified by:
login interfaceio.opentracing.Span
-
log
- Specified by:
login interfaceio.opentracing.Span
-
log
- Specified by:
login interfaceio.opentracing.Span
-
log
- Specified by:
login interfaceio.opentracing.Span
-
setBaggageItem
This is a NOOP unlessBaggagePropagationis in use- Specified by:
setBaggageItemin interfaceio.opentracing.Span
-
getBaggageItem
public java.lang.String getBaggageItem(java.lang.String key)Returns null unlessBaggagePropagationis in use- Specified by:
getBaggageItemin interfaceio.opentracing.Span
-
setOperationName
- Specified by:
setOperationNamein interfaceio.opentracing.Span
-
finish
public void finish()- Specified by:
finishin interfaceio.opentracing.Span
-
finish
public void finish(long finishMicros)- Specified by:
finishin interfaceio.opentracing.Span
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
equals
public final boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public final int hashCode()- Overrides:
hashCodein classjava.lang.Object
-