Class Tag<T>

java.lang.Object
io.helidon.tracing.Tag<T>
Type Parameters:
T - type of the tag

public abstract class Tag<T> extends Object
Tag abstraction that can be used with TracerBuilder.addTracerTag(String, String).
  • Method Details

    • create

      public static Tag<String> create(String key, String value)
      Create a string tag.
      Parameters:
      key - tag name
      value - tag value
      Returns:
      string tag
    • create

      public static Tag<Number> create(String key, Number value)
      Create a numeric tag.
      Parameters:
      key - tag name
      value - tag value
      Returns:
      numeric tag
    • create

      public static Tag<Boolean> create(String key, boolean value)
      Create a boolean tag.
      Parameters:
      key - tag name
      value - tag value
      Returns:
      boolean tag
    • key

      public String key()
      Tag name.
      Returns:
      tag name
    • value

      public T value()
      Tag value.
      Returns:
      tag value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

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

      public abstract void apply(Span span)
      Configure this tag on the span provided.
      Parameters:
      span - span to apply the tag on