Class CurrentTagMapUtils

java.lang.Object
io.opencensus.implcore.tags.CurrentTagMapUtils

final class CurrentTagMapUtils extends Object
Utility methods for accessing the TagContext contained in the Context.
  • Constructor Details

    • CurrentTagMapUtils

      private CurrentTagMapUtils()
  • Method Details

    • getCurrentTagMap

      static TagContext getCurrentTagMap()
      Returns the TagContext from the current context.
      Returns:
      the TagContext from the current context.
    • withTagMap

      static Scope withTagMap(TagContext tags)
      Enters the scope of code where the given TagContext 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 - the TagContext to be set to the current context.
      Returns:
      an object that defines a scope where the given TagContext is set to the current context.