Class Span.Event.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<Span.Event,Span.Event.Builder>
io.opentelemetry.proto.trace.v1.Span.Event.Builder
All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, Span.EventOrBuilder, Cloneable
Enclosing class:
Span.Event

public static final class Span.Event.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<Span.Event,Span.Event.Builder> implements Span.EventOrBuilder
 Event is a time-stamped annotation of the span, consisting of user-supplied
 text description and key-value pairs.
 
Protobuf type opentelemetry.proto.trace.v1.Span.Event
  • Method Details

    • getTimeUnixNano

      public long getTimeUnixNano()
       The time the event occurred.
       
      fixed64 time_unix_nano = 1 [json_name = "timeUnixNano"];
      Specified by:
      getTimeUnixNano in interface Span.EventOrBuilder
      Returns:
      The timeUnixNano.
    • setTimeUnixNano

      public Span.Event.Builder setTimeUnixNano(long value)
       The time the event occurred.
       
      fixed64 time_unix_nano = 1 [json_name = "timeUnixNano"];
      Parameters:
      value - The timeUnixNano to set.
      Returns:
      This builder for chaining.
    • clearTimeUnixNano

      public Span.Event.Builder clearTimeUnixNano()
       The time the event occurred.
       
      fixed64 time_unix_nano = 1 [json_name = "timeUnixNano"];
      Returns:
      This builder for chaining.
    • getName

      public String getName()
       The name of the event.
       This field is semantically required to be set to non-empty string.
       
      string name = 2 [json_name = "name"];
      Specified by:
      getName in interface Span.EventOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       The name of the event.
       This field is semantically required to be set to non-empty string.
       
      string name = 2 [json_name = "name"];
      Specified by:
      getNameBytes in interface Span.EventOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Span.Event.Builder setName(String value)
       The name of the event.
       This field is semantically required to be set to non-empty string.
       
      string name = 2 [json_name = "name"];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Span.Event.Builder clearName()
       The name of the event.
       This field is semantically required to be set to non-empty string.
       
      string name = 2 [json_name = "name"];
      Returns:
      This builder for chaining.
    • setNameBytes

      public Span.Event.Builder setNameBytes(com.google.protobuf.ByteString value)
       The name of the event.
       This field is semantically required to be set to non-empty string.
       
      string name = 2 [json_name = "name"];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getAttributesList

      public List<KeyValue> getAttributesList()
       A collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"];
      Specified by:
      getAttributesList in interface Span.EventOrBuilder
    • getAttributesCount

      public int getAttributesCount()
       A collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"];
      Specified by:
      getAttributesCount in interface Span.EventOrBuilder
    • getAttributes

      public KeyValue getAttributes(int index)
       A collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"];
      Specified by:
      getAttributes in interface Span.EventOrBuilder
    • setAttributes

      public Span.Event.Builder setAttributes(int index, KeyValue value)
       A collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"];
    • setAttributes

      public Span.Event.Builder setAttributes(int index, KeyValue.Builder builderForValue)
       A collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"];
    • addAttributes

      public Span.Event.Builder addAttributes(KeyValue value)
       A collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"];
    • addAttributes

      public Span.Event.Builder addAttributes(int index, KeyValue value)
       A collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"];
    • addAttributes

      public Span.Event.Builder addAttributes(KeyValue.Builder builderForValue)
       A collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"];
    • addAttributes

      public Span.Event.Builder addAttributes(int index, KeyValue.Builder builderForValue)
       A collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"];
    • addAllAttributes

      public Span.Event.Builder addAllAttributes(Iterable<? extends KeyValue> values)
       A collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"];
    • clearAttributes

      public Span.Event.Builder clearAttributes()
       A collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"];
    • removeAttributes

      public Span.Event.Builder removeAttributes(int index)
       A collection of attribute key/value pairs on the event.
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       The behavior of software that receives duplicated keys can be unpredictable.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3 [json_name = "attributes"];
    • getDroppedAttributesCount

      public int getDroppedAttributesCount()
       The number of dropped attributes. If the value is 0,
       then no attributes were dropped.
       
      uint32 dropped_attributes_count = 4 [json_name = "droppedAttributesCount"];
      Specified by:
      getDroppedAttributesCount in interface Span.EventOrBuilder
      Returns:
      The droppedAttributesCount.
    • setDroppedAttributesCount

      public Span.Event.Builder setDroppedAttributesCount(int value)
       The number of dropped attributes. If the value is 0,
       then no attributes were dropped.
       
      uint32 dropped_attributes_count = 4 [json_name = "droppedAttributesCount"];
      Parameters:
      value - The droppedAttributesCount to set.
      Returns:
      This builder for chaining.
    • clearDroppedAttributesCount

      public Span.Event.Builder clearDroppedAttributesCount()
       The number of dropped attributes. If the value is 0,
       then no attributes were dropped.
       
      uint32 dropped_attributes_count = 4 [json_name = "droppedAttributesCount"];
      Returns:
      This builder for chaining.