Class TagContext

java.lang.Object
io.opencensus.tags.TagContext
Direct Known Subclasses:
ContextUtils.EmptyTagContext, NoopTags.NoopTagContext, TagMapImpl

@Immutable public abstract class TagContext extends Object
A map from TagKey to TagValue that can be used to label anything that is associated with a specific operation.

For example, TagContexts can be used to label stats, log messages, or debugging information.

Since:
0.8
  • Constructor Details

    • TagContext

      public TagContext()
  • Method Details

    • getIterator

      protected abstract Iterator<Tag> getIterator()
      Returns an iterator over the tags in this TagContext.
      Returns:
      an iterator over the tags in this TagContext.
      Since:
      0.8
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(@Nullable Object other)
      Returns true iff the other object is an instance of TagContext and contains the same key-value pairs. Implementations are free to override this method to provide better performance.
      Overrides:
      equals in class Object
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object