Class Tags

java.lang.Object
org.opensearch.telemetry.metrics.tags.Tags

@ExperimentalApi public class Tags extends Object
Class to create tags for a meter.
Opensearch.experimental:
  • Field Details

    • EMPTY

      public static final Tags EMPTY
      Empty value.
  • Method Details

    • create

      public static Tags create()
      Factory method.
      Returns:
      tags.
    • addTag

      public Tags addTag(String key, String value)
      Add String attribute.
      Parameters:
      key - key
      value - value
      Returns:
      Same instance.
    • addTag

      public Tags addTag(String key, long value)
      Add long attribute.
      Parameters:
      key - key
      value - value
      Returns:
      Same instance.
    • addTag

      public Tags addTag(String key, double value)
      Add double attribute.
      Parameters:
      key - key
      value - value
      Returns:
      Same instance.
    • addTag

      public Tags addTag(String key, boolean value)
      Add boolean attribute.
      Parameters:
      key - key
      value - value
      Returns:
      Same instance.
    • getTagsMap

      public Map<String,?> getTagsMap()
      Returns the attribute map.
      Returns:
      tags map