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).
  • Field Details

    • COMPONENT

      public static final Tag.TagSource<String> COMPONENT
      Tag marking a component that triggers this span.
    • HTTP_METHOD

      public static final Tag.TagSource<String> HTTP_METHOD
      Http method used to invoke this request.
    • HTTP_URL

      public static final Tag.TagSource<String> HTTP_URL
      URL of the HTTP request.
    • HTTP_VERSION

      public static final Tag.TagSource<String> HTTP_VERSION
      HTTP version.
    • HTTP_STATUS

      public static final Tag.TagSource<Integer> HTTP_STATUS
      Status code that was returned.
    • DB_TYPE

      public static final Tag.TagSource<String> DB_TYPE
      Tag marking a Database type.
    • DB_STATEMENT

      public static final Tag.TagSource<String> DB_STATEMENT
      Tag marking a Database statement.
  • 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
    • apply

      public abstract void apply(Span.Builder<?> spanBuilder)
      Configure this tag on the span builder.
      Parameters:
      spanBuilder - span builder to apply the tag on