Package io.opencensus.tags
Class Tag
java.lang.Object
io.opencensus.tags.Tag
- Direct Known Subclasses:
AutoValue_Tag
- Since:
- 0.8
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Tag
Deprecated.static Tag
create
(TagKey key, TagValue value, TagMetadata tagMetadata) Creates aTag
from the given key, value and metadata.abstract TagKey
getKey()
Returns the tag's key.abstract TagMetadata
Returns theTagMetadata
associated with thisTag
.abstract TagValue
getValue()
Returns the tag's value.
-
Field Details
-
METADATA_UNLIMITED_PROPAGATION
-
-
Constructor Details
-
Tag
Tag()
-
-
Method Details
-
create
Deprecated.in favor ofcreate(TagKey, TagValue, TagMetadata)
.Creates aTag
from the given key and value.For backwards-compatibility this method still produces propagating
Tag
s.This is equivalent to calling
create(key, value, TagMetadata.create(TagTtl.UNLIMITED_PROPAGATION))
.- Parameters:
key
- the tag key.value
- the tag value.- Returns:
- a
Tag
with the given key and value. - Since:
- 0.8
-
create
Creates aTag
from 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
Returns the tag's key.- Returns:
- the tag's key.
- Since:
- 0.8
-
getValue
Returns the tag's value.- Returns:
- the tag's value.
- Since:
- 0.8
-
getTagMetadata
Returns theTagMetadata
associated with thisTag
.- Returns:
- the
TagMetadata
. - Since:
- 0.20
-
create(TagKey, TagValue, TagMetadata)
.