Enum TagMetadata.TagTtl

java.lang.Object
java.lang.Enum<TagMetadata.TagTtl>
io.opencensus.tags.TagMetadata.TagTtl
All Implemented Interfaces:
Serializable, Comparable<TagMetadata.TagTtl>
Enclosing class:
TagMetadata

public static enum TagMetadata.TagTtl extends Enum<TagMetadata.TagTtl>
TagMetadata.TagTtl is an integer that represents number of hops a tag can propagate.

Anytime a sender serializes a tag, sends it over the wire and receiver deserializes the tag then the tag is considered to have travelled one hop.

There could be one or more proxy(ies) between sender and receiver. Proxies are treated as transparent entities and they are not counted as hops.

For now, only special values of TagMetadata.TagTtl are supported.

Since:
0.20
  • Enum Constant Details

    • NO_PROPAGATION

      public static final TagMetadata.TagTtl NO_PROPAGATION
      A Tag with NO_PROPAGATION is considered to have local scope and is used within the process where it's created.
      Since:
      0.20
    • UNLIMITED_PROPAGATION

      public static final TagMetadata.TagTtl UNLIMITED_PROPAGATION
      A Tag with UNLIMITED_PROPAGATION can propagate unlimited hops.

      However, it is still subject to outgoing and incoming (on remote side) filter criteria.

      UNLIMITED_PROPAGATION is typical used to track a request, which may be processed across multiple entities.

      Since:
      0.20
  • Field Details

    • hops

      private final int hops
  • Constructor Details

    • TagTtl

      private TagTtl(int hops)
  • Method Details

    • values

      public static TagMetadata.TagTtl[] 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 TagMetadata.TagTtl 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