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 TagContextReturns theTagContextfrom the current context.(package private) static ScopewithTagMap(TagContext tags) Enters the scope of code where the givenTagContextis in the current context and returns an object that represents that scope.
-
Constructor Details
-
CurrentTagMapUtils
private CurrentTagMapUtils()
-
-
Method Details
-
getCurrentTagMap
Returns theTagContextfrom the current context.- Returns:
- the
TagContextfrom the current context.
-
withTagMap
Enters the scope of code where the givenTagContextis in the current context and returns an object that represents that scope. The scope is exited when the returned object is closed.- Parameters:
tags- theTagContextto be set to the current context.- Returns:
- an object that defines a scope where the given
TagContextis set to the current context.
-