Package brave

Enum NoopSpanCustomizer

All Implemented Interfaces:
SpanCustomizer, Serializable, Comparable<NoopSpanCustomizer>, java.lang.constant.Constable

public enum NoopSpanCustomizer
extends Enum<NoopSpanCustomizer>
implements SpanCustomizer
Performs no operations as the span represented by this is not sampled to report to the tracing system.
  • Enum Constant Details

  • Method Details

    • values

      public static NoopSpanCustomizer[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static NoopSpanCustomizer valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • name

      public SpanCustomizer name​(String name)
      Description copied from interface: SpanCustomizer
      Sets the string name for the logical operation this span represents.
      Specified by:
      name in interface SpanCustomizer
    • tag

      public SpanCustomizer tag​(String key, String value)
      Description copied from interface: SpanCustomizer
      Tags give your span context for search, viewing and analysis. For example, a key "your_app.version" would let you lookup spans by version. A tag "sql.query" isn't searchable, but it can help in debugging when viewing a trace.

      Note:To guard potentially expensive parsing, implement Tag instead, which avoids parsing into a no-op span.

      Ex.

      {@code
       SUMMARY_TAG = new Tag("summary") {
      Specified by:
      tag in interface SpanCustomizer
      Parameters:
      key - Name used to lookup spans, such as "your_app.version".
      value - String value, cannot be null.
      See Also:
      Tag.tag(Object, SpanCustomizer)
    • annotate

      public SpanCustomizer annotate​(String value)
      Description copied from interface: SpanCustomizer
      Associates an event that explains latency with the current system time.
      Specified by:
      annotate in interface SpanCustomizer
      Parameters:
      value - A short tag indicating the event, like "finagle.retry"
    • toString

      public String toString()
      Overrides:
      toString in class Enum<NoopSpanCustomizer>