Package io.opencensus.tags
Class Tag
- java.lang.Object
-
- io.opencensus.tags.Tag
-
- Direct Known Subclasses:
AutoValue_Tag
@Immutable public abstract class Tag extends java.lang.Object- Since:
- 0.8
-
-
Field Summary
Fields Modifier and Type Field Description private static TagMetadataMETADATA_UNLIMITED_PROPAGATION
-
Constructor Summary
Constructors Constructor Description Tag()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Tagcreate(TagKey key, TagValue value)Deprecated.in favor ofcreate(TagKey, TagValue, TagMetadata).static Tagcreate(TagKey key, TagValue value, TagMetadata tagMetadata)Creates aTagfrom the given key, value and metadata.abstract TagKeygetKey()Returns the tag's key.abstract TagMetadatagetTagMetadata()Returns theTagMetadataassociated with thisTag.abstract TagValuegetValue()Returns the tag's value.
-
-
-
Field Detail
-
METADATA_UNLIMITED_PROPAGATION
private static final TagMetadata METADATA_UNLIMITED_PROPAGATION
-
-
Method Detail
-
create
@Deprecated public static Tag create(TagKey key, TagValue value)
Deprecated.in favor ofcreate(TagKey, TagValue, TagMetadata).Creates aTagfrom the given key and value.For backwards-compatibility this method still produces propagating
Tags.This is equivalent to calling
create(key, value, TagMetadata.create(TagTtl.UNLIMITED_PROPAGATION)).- Parameters:
key- the tag key.value- the tag value.- Returns:
- a
Tagwith the given key and value. - Since:
- 0.8
-
create
public static Tag create(TagKey key, TagValue value, TagMetadata tagMetadata)
Creates aTagfrom the given key, value and metadata.- Parameters:
key- the tag key.value- the tag value.tagMetadata- the tag metadata.- Returns:
- a
Tag. - Since:
- 0.20
-
getKey
public abstract TagKey getKey()
Returns the tag's key.- Returns:
- the tag's key.
- Since:
- 0.8
-
getValue
public abstract TagValue getValue()
Returns the tag's value.- Returns:
- the tag's value.
- Since:
- 0.8
-
getTagMetadata
public abstract TagMetadata getTagMetadata()
Returns theTagMetadataassociated with thisTag.- Returns:
- the
TagMetadata. - Since:
- 0.20
-
-