Package brave.handler
Class FinishedSpanHandler
- java.lang.Object
-
- brave.handler.SpanHandler
-
- brave.handler.FinishedSpanHandler
-
@Deprecated public abstract class FinishedSpanHandler extends SpanHandler
Deprecated.Since 5.12 useSpanHandler.end(TraceContext, MutableSpan, Cause)withSpanHandler.Cause.FINISHED- Since:
- 5.4
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class brave.handler.SpanHandler
SpanHandler.Cause
-
-
Field Summary
Fields Modifier and Type Field Description static FinishedSpanHandlerNOOPDeprecated.Since 5.12 useSpanHandler.NOOP
-
Constructor Summary
Constructors Constructor Description FinishedSpanHandler()Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description booleanalwaysSampleLocal()Deprecated.Since 5.12, setTracing.Builder.alwaysSampleLocal().booleanend(TraceContext context, MutableSpan span, SpanHandler.Cause cause)Deprecated.Called when data collection complete.abstract booleanhandle(TraceContext context, MutableSpan span)Deprecated.Since 5.12 useSpanHandler.end(TraceContext, MutableSpan, Cause)withSpanHandler.Cause.FINISHEDbooleansupportsOrphans()Deprecated.Since 5.12 useSpanHandler.end(TraceContext, MutableSpan, Cause)withSpanHandler.Cause.ORPHANED-
Methods inherited from class brave.handler.SpanHandler
begin, handlesAbandoned
-
-
-
-
Field Detail
-
NOOP
public static final FinishedSpanHandler NOOP
Deprecated.Since 5.12 useSpanHandler.NOOPUse to avoid comparing againstnullreferences.- Since:
- 5.4
-
-
Method Detail
-
handle
public abstract boolean handle(TraceContext context, MutableSpan span)
Deprecated.Since 5.12 useSpanHandler.end(TraceContext, MutableSpan, Cause)withSpanHandler.Cause.FINISHED- Since:
- 5.4
-
supportsOrphans
public boolean supportsOrphans()
Deprecated.Since 5.12 useSpanHandler.end(TraceContext, MutableSpan, Cause)withSpanHandler.Cause.ORPHANED- Since:
- 5.7
-
alwaysSampleLocal
@Deprecated public boolean alwaysSampleLocal()
Deprecated.Since 5.12, setTracing.Builder.alwaysSampleLocal(). Tip: the sameTracingCustomizerthat adds this handler can also also setTracing.Builder.alwaysSampleLocal().- Since:
- 5.4
-
end
public boolean end(TraceContext context, MutableSpan span, SpanHandler.Cause cause)
Deprecated.Description copied from class:SpanHandlerCalled when data collection complete.Advanced Note
By default, this only receives callbacks when data is intended to be recorded. If you are implementing tracking betweenSpanHandler.begin(brave.propagation.TraceContext, brave.handler.MutableSpan, brave.propagation.TraceContext)and here, you should consider overridingSpanHandler.handlesAbandoned()so that you have parity for all cases.- Overrides:
endin classSpanHandler- Parameters:
context- same instance as passed toSpanHandler.begin(brave.propagation.TraceContext, brave.handler.MutableSpan, brave.propagation.TraceContext)span- same instance as passed toSpanHandler.begin(brave.propagation.TraceContext, brave.handler.MutableSpan, brave.propagation.TraceContext)cause- why the data collection stopped.- Returns:
trueretains the span, and should almost always be used.falsedrops the span, making it invisible to later handlers such as Zipkin.- See Also:
SpanHandler.begin(TraceContext, MutableSpan, TraceContext),SpanHandler.Cause
-
-