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 use
SpanHandler.end(TraceContext, MutableSpan, Cause)
with SpanHandler.Cause.FINISHED
- Since:
- 5.4
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description static FinishedSpanHandler
NOOP
Deprecated.Since 5.12 useSpanHandler.NOOP
-
Constructor Summary
Constructors Constructor Description FinishedSpanHandler()
Deprecated. -
Method Summary
Modifier and Type Method Description boolean
alwaysSampleLocal()
Deprecated.Since 5.12, setTracing.Builder.alwaysSampleLocal()
.boolean
end(TraceContext context, MutableSpan span, SpanHandler.Cause cause)
Deprecated.Called when data collection complete.abstract boolean
handle(TraceContext context, MutableSpan span)
Deprecated.Since 5.12 useSpanHandler.end(TraceContext, MutableSpan, Cause)
withSpanHandler.Cause.FINISHED
boolean
supportsOrphans()
Deprecated.Since 5.12 useSpanHandler.end(TraceContext, MutableSpan, Cause)
withSpanHandler.Cause.ORPHANED
-
Field Details
-
NOOP
Deprecated.Since 5.12 useSpanHandler.NOOP
Use to avoid comparing againstnull
references.- Since:
- 5.4
-
-
Constructor Details
-
FinishedSpanHandler
public FinishedSpanHandler()Deprecated.
-
-
Method Details
-
handle
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.Since 5.12, setTracing.Builder.alwaysSampleLocal()
. Tip: the sameTracingCustomizer
that adds this handler can also also setTracing.Builder.alwaysSampleLocal()
.- Since:
- 5.4
-
end
Deprecated.Description copied from class:SpanHandler
Called 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:
end
in 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:
true
retains the span, and should almost always be used.false
drops the span, making it invisible to later handlers such as Zipkin.- See Also:
SpanHandler.begin(TraceContext, MutableSpan, TraceContext)
,SpanHandler.Cause
-