Class Annotation
java.lang.Object
io.opencensus.trace.Annotation
- Direct Known Subclasses:
AutoValue_Annotation
A text annotation with a set of attributes.
- Since:
- 0.5
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AnnotationfromDescription(String description) Returns a newAnnotationwith the given description.static AnnotationfromDescriptionAndAttributes(String description, Map<String, AttributeValue> attributes) Returns a newAnnotationwith the given description and set of attributes.abstract Map<String, AttributeValue> Return the attributes of theAnnotation.abstract StringReturn the description of theAnnotation.
-
Field Details
-
EMPTY_ATTRIBUTES
-
-
Constructor Details
-
Annotation
Annotation()
-
-
Method Details
-
fromDescription
Returns a newAnnotationwith the given description.- Parameters:
description- the text description of theAnnotation.- Returns:
- a new
Annotationwith the given description. - Throws:
NullPointerException- ifdescriptionisnull.- Since:
- 0.5
-
fromDescriptionAndAttributes
public static Annotation fromDescriptionAndAttributes(String description, Map<String, AttributeValue> attributes) Returns a newAnnotationwith the given description and set of attributes.- Parameters:
description- the text description of theAnnotation.attributes- the attributes of theAnnotation.- Returns:
- a new
Annotationwith the given description and set of attributes. - Throws:
NullPointerException- ifdescriptionorattributesarenull.- Since:
- 0.5
-
getDescription
Return the description of theAnnotation.- Returns:
- the description of the
Annotation. - Since:
- 0.5
-
getAttributes
Return the attributes of theAnnotation.- Returns:
- the attributes of the
Annotation. - Since:
- 0.5
-