Class StatsTestUtils.MockableSpan
java.lang.Object
io.opencensus.trace.Span
io.grpc.internal.testing.StatsTestUtils.MockableSpan
- Enclosing class:
StatsTestUtils
public static class StatsTestUtils.MockableSpan
extends io.opencensus.trace.Span
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classMockable implementation for theSpanBuilderclass.Nested classes/interfaces inherited from class io.opencensus.trace.Span
io.opencensus.trace.Span.Kind, io.opencensus.trace.Span.Options -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateMockableSpan(io.opencensus.trace.SpanContext context, EnumSet<io.opencensus.trace.Span.Options> options) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(io.opencensus.trace.Annotation annotation) voidaddAnnotation(String description, Map<String, io.opencensus.trace.AttributeValue> attributes) voidaddLink(io.opencensus.trace.Link link) voidaddMessageEvent(io.opencensus.trace.MessageEvent messageEvent) voidend(io.opencensus.trace.EndSpanOptions options) static StatsTestUtils.MockableSpangenerateRandomSpan(Random random) Creates a MockableSpan with a random trace ID and span ID.voidputAttributes(Map<String, io.opencensus.trace.AttributeValue> attributes) Methods inherited from class io.opencensus.trace.Span
addAnnotation, addAttributes, addNetworkEvent, end, getContext, getOptions, putAttribute, setStatus
-
Constructor Details
-
MockableSpan
-
-
Method Details
-
generateRandomSpan
Creates a MockableSpan with a random trace ID and span ID. -
putAttributes
-
addAnnotation
-
addAnnotation
public void addAnnotation(io.opencensus.trace.Annotation annotation) - Specified by:
addAnnotationin classio.opencensus.trace.Span
-
addMessageEvent
public void addMessageEvent(io.opencensus.trace.MessageEvent messageEvent) - Overrides:
addMessageEventin classio.opencensus.trace.Span
-
addLink
public void addLink(io.opencensus.trace.Link link) - Specified by:
addLinkin classio.opencensus.trace.Span
-
end
public void end(io.opencensus.trace.EndSpanOptions options) - Specified by:
endin classio.opencensus.trace.Span
-