Class BlankSpan
java.lang.Object
io.opencensus.trace.Span
io.opencensus.trace.BlankSpan
The
BlankSpan is a singleton class, which is the default Span that is used when
no Span implementation is available. All operations are no-op.
Used also to stop tracing, see Tracer.withSpan(Span).
- Since:
- 0.5
-
Nested Class Summary
Nested classes/interfaces inherited from class Span
Span.Kind, Span.Options -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(Annotation annotation) No-op implementation of theSpan.addAnnotation(Annotation)method.voidaddAnnotation(String description, Map<String, AttributeValue> attributes) No-op implementation of theSpan.addAnnotation(String, Map)method.voidNo-op implementation of theSpan.addLink(Link)method.voidaddMessageEvent(MessageEvent messageEvent) No-op implementation of theSpan.addMessageEvent(MessageEvent)method.voidaddNetworkEvent(NetworkEvent networkEvent) Deprecated.voidend(EndSpanOptions options) No-op implementation of theSpan.end(EndSpanOptions)method.voidputAttribute(String key, AttributeValue value) No-op implementation of theSpan.putAttribute(String, AttributeValue)method.voidputAttributes(Map<String, AttributeValue> attributes) No-op implementation of theSpan.putAttributes(Map)method.voidSets theStatusto theSpan.toString()Methods inherited from class Span
addAnnotation, addAttributes, end, getContext, getOptions
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
BlankSpan
private BlankSpan()
-
-
Method Details
-
putAttribute
No-op implementation of theSpan.putAttribute(String, AttributeValue)method.- Overrides:
putAttributein classSpan- Parameters:
key- the key for this attribute.value- the value for this attribute.
-
putAttributes
No-op implementation of theSpan.putAttributes(Map)method.- Overrides:
putAttributesin classSpan- Parameters:
attributes- the attributes that will be added and associated with theSpan.
-
addAnnotation
No-op implementation of theSpan.addAnnotation(String, Map)method.- Specified by:
addAnnotationin classSpan- Parameters:
description- the description of the annotation time event.attributes- the attributes that will be added; these are associated with this annotation, not theSpanas forSpan.putAttributes(Map).
-
addAnnotation
No-op implementation of theSpan.addAnnotation(Annotation)method.- Specified by:
addAnnotationin classSpan- Parameters:
annotation- the annotations to add.
-
addNetworkEvent
Deprecated.No-op implementation of theSpan.addNetworkEvent(NetworkEvent)method.- Overrides:
addNetworkEventin classSpan- Parameters:
networkEvent- the network event to add.
-
addMessageEvent
No-op implementation of theSpan.addMessageEvent(MessageEvent)method.- Overrides:
addMessageEventin classSpan- Parameters:
messageEvent- the message to add.
-
addLink
No-op implementation of theSpan.addLink(Link)method. -
setStatus
Description copied from class:SpanSets theStatusto theSpan.If used, this will override the default
Spanstatus. Default isStatus.OK.Only the value of the last call will be recorded, and implementations are free to ignore previous calls. If the status is set via
EndSpanOptions.Builder.setStatus(Status)that will always be the last call. -
end
No-op implementation of theSpan.end(EndSpanOptions)method. -
toString
-