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