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 voidclear()booleanend(TraceContext context, MutableSpan span, SpanHandler.Cause cause)MutableSpanget(int i)Iterator<MutableSpan>iterator()List<MutableSpan>spans()StringtoString()
-
Constructor Details
-
TestSpanHandler
public TestSpanHandler()
-
-
Method Details