-
public interface SpanImpl.ConditionRepresents a possible "block" to a Span being ended naturally. Any conditions that are active when SpanImpl.end is called will prevent the span from being batched and processed, until all of the Conditions are either cancelled, timed-out, or closed. A condition is considered "inactive" until it is upgradeed, at which point the Condition.close will cause the span end-time to be adjusted.
These are a way to deal with cases where a span "might have child spans at some point in the future, where the parent span end time should match the last of these children".
-
-
Method Summary
Modifier and Type Method Description abstract Unitclose(Long endTime)Close this Condition possibly releasing the underlying Span for batching and processing. abstract SpanContextupgrade()Attempt to upgrade this Condition. abstract Unitcancel()Cancel this Condition possibly releasing the underlying Span for batching and processing. Spanwrap(Span span)Wrap a span in a span which also closes this Conditionwhen it ends.-
-
Method Detail
-
upgrade
abstract SpanContext upgrade()
Attempt to upgrade this Condition. A Condition may only be upgraded only be upgraded once, and must still be valid (not closed, or cancelled) in order to be upgraded.
-
-
-
-