Package io.opencensus.tags
Class NoopTags.NoopTagger
- java.lang.Object
-
- io.opencensus.tags.Tagger
-
- io.opencensus.tags.NoopTags.NoopTagger
-
-
Constructor Summary
Constructors Modifier Constructor Description private
NoopTagger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TagContextBuilder
currentBuilder()
Returns a new builder created from the currentTagContext
.TagContext
empty()
Returns an emptyTagContext
.TagContextBuilder
emptyBuilder()
Returns a new emptyBuilder
.TagContext
getCurrentTagContext()
Returns the currentTagContext
.TagContextBuilder
toBuilder(TagContext tags)
Returns a builder based on thisTagContext
.Scope
withTagContext(TagContext tags)
Enters the scope of code where the givenTagContext
is in the current context (replacing the previousTagContext
) and returns an object that represents that scope.
-
-
-
Field Detail
-
INSTANCE
static final Tagger INSTANCE
-
-
Method Detail
-
empty
public TagContext empty()
Description copied from class:Tagger
Returns an emptyTagContext
.
-
getCurrentTagContext
public TagContext getCurrentTagContext()
Description copied from class:Tagger
Returns the currentTagContext
.- Specified by:
getCurrentTagContext
in classTagger
- Returns:
- the current
TagContext
.
-
emptyBuilder
public TagContextBuilder emptyBuilder()
Description copied from class:Tagger
Returns a new emptyBuilder
.- Specified by:
emptyBuilder
in classTagger
- Returns:
- a new empty
Builder
.
-
toBuilder
public TagContextBuilder toBuilder(TagContext tags)
Description copied from class:Tagger
Returns a builder based on thisTagContext
.
-
currentBuilder
public TagContextBuilder currentBuilder()
Description copied from class:Tagger
Returns a new builder created from the currentTagContext
.- Specified by:
currentBuilder
in classTagger
- Returns:
- a new builder created from the current
TagContext
.
-
withTagContext
public Scope withTagContext(TagContext tags)
Description copied from class:Tagger
Enters the scope of code where the givenTagContext
is in the current context (replacing the previousTagContext
) and returns an object that represents that scope. The scope is exited when the returned object is closed.- Specified by:
withTagContext
in classTagger
- Parameters:
tags
- theTagContext
to be set to the current context.- Returns:
- an object that defines a scope where the given
TagContext
is set to the current context.
-
-