Package brave.test
Class TestSpanHandler
java.lang.Object
brave.handler.SpanHandler
brave.test.TestSpanHandler
- All Implemented Interfaces:
Iterable<MutableSpan>
public final class TestSpanHandler extends SpanHandler implements Iterable<MutableSpan>
Simpler variant of
IntegrationTestSpanHandler
appropriate for single-threaded
unit-tests.
Ex.
{@code TestSpanHandler spans = new TestSpanHandler(); Tracing tracing = Tracing.newBuilder().addSpanHandler(spans).build();
- Since:
- 5.12
- See Also:
IntegrationTestSpanHandler
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
Constructors Constructor Description TestSpanHandler()
-
Method Summary
Modifier and Type Method Description void
clear()
boolean
end(TraceContext context, MutableSpan span, SpanHandler.Cause cause)
MutableSpan
get(int i)
Iterator<MutableSpan>
iterator()
List<MutableSpan>
spans()
String
toString()
-
Constructor Details
-
TestSpanHandler
public TestSpanHandler()
-
-
Method Details