Package io.opencensus.implcore.tags
Class CurrentTagMapUtils
- java.lang.Object
-
- io.opencensus.implcore.tags.CurrentTagMapUtils
-
final class CurrentTagMapUtils extends java.lang.ObjectUtility methods for accessing theTagContextcontained in theContext.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classCurrentTagMapUtils.WithTagMap
-
Constructor Summary
Constructors Modifier Constructor Description privateCurrentTagMapUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description (package private) static TagContextgetCurrentTagMap()Returns 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.
-
-
-
Method Detail
-
getCurrentTagMap
static TagContext getCurrentTagMap()
Returns theTagContextfrom the current context.- Returns:
- the
TagContextfrom the current context.
-
withTagMap
static Scope withTagMap(TagContext tags)
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.
-
-