Package io.grpc.internal.testing
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 Classes Modifier and Type Class Description static class
StatsTestUtils.MockableSpan.Builder
Mockable implementation for theSpanBuilder
class.
-
Constructor Summary
Constructors Modifier Constructor Description private
MockableSpan(io.opencensus.trace.SpanContext context, java.util.EnumSet<io.opencensus.trace.Span.Options> options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAnnotation(io.opencensus.trace.Annotation annotation)
void
addAnnotation(java.lang.String description, java.util.Map<java.lang.String,io.opencensus.trace.AttributeValue> attributes)
void
addLink(io.opencensus.trace.Link link)
void
addMessageEvent(io.opencensus.trace.MessageEvent messageEvent)
void
end(io.opencensus.trace.EndSpanOptions options)
static StatsTestUtils.MockableSpan
generateRandomSpan(java.util.Random random)
Creates a MockableSpan with a random trace ID and span ID.void
putAttributes(java.util.Map<java.lang.String,io.opencensus.trace.AttributeValue> attributes)
-
-
-
Method Detail
-
generateRandomSpan
public static StatsTestUtils.MockableSpan generateRandomSpan(java.util.Random random)
Creates a MockableSpan with a random trace ID and span ID.
-
putAttributes
public void putAttributes(java.util.Map<java.lang.String,io.opencensus.trace.AttributeValue> attributes)
- Overrides:
putAttributes
in classio.opencensus.trace.Span
-
addAnnotation
public void addAnnotation(java.lang.String description, java.util.Map<java.lang.String,io.opencensus.trace.AttributeValue> attributes)
- Specified by:
addAnnotation
in classio.opencensus.trace.Span
-
addAnnotation
public void addAnnotation(io.opencensus.trace.Annotation annotation)
- Specified by:
addAnnotation
in classio.opencensus.trace.Span
-
addMessageEvent
public void addMessageEvent(io.opencensus.trace.MessageEvent messageEvent)
- Overrides:
addMessageEvent
in classio.opencensus.trace.Span
-
addLink
public void addLink(io.opencensus.trace.Link link)
- Specified by:
addLink
in classio.opencensus.trace.Span
-
end
public void end(io.opencensus.trace.EndSpanOptions options)
- Specified by:
end
in classio.opencensus.trace.Span
-
-