Package io.opencensus.implcore.tags
Class CurrentTagMapUtils
java.lang.Object
io.opencensus.implcore.tags.CurrentTagMapUtils
Utility methods for accessing the
TagContext
contained in the Context
.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static TagContext
Returns theTagContext
from the current context.(package private) static Scope
withTagMap
(TagContext tags) Enters the scope of code where the givenTagContext
is in the current context and returns an object that represents that scope.
-
Constructor Details
-
CurrentTagMapUtils
private CurrentTagMapUtils()
-
-
Method Details
-
getCurrentTagMap
Returns theTagContext
from the current context.- Returns:
- the
TagContext
from the current context.
-
withTagMap
Enters the scope of code where the givenTagContext
is in the current context and returns an object that represents that scope. The scope is exited when the returned object is closed.- 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.
-