Class Span.Event.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Span.Event.Builder>
io.opentelemetry.proto.trace.v1.Span.Event.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Span.EventOrBuilder, Cloneable
Enclosing class:
Span.Event

public static final class Span.Event.Builder extends com.google.protobuf.GeneratedMessage.Builder<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

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Span.Event.Builder>
    • clear

      public Span.Event.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Span.Event.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Span.Event.Builder>
    • getDefaultInstanceForType

      public Span.Event getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Span.Event build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Span.Event buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Span.Event.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Span.Event.Builder>
    • mergeFrom

      public Span.Event.Builder mergeFrom(Span.Event other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Span.Event.Builder>
    • mergeFrom

      public Span.Event.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Span.Event.Builder>
      Throws:
      IOException
    • getTimeUnixNano

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

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

      public Span.Event.Builder clearTimeUnixNano()
       time_unix_nano is the time the event occurred.
       
      fixed64 time_unix_nano = 1;
      Returns:
      This builder for chaining.
    • getName

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

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

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

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

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

      public List<KeyValue> getAttributesList()
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
      Specified by:
      getAttributesList in interface Span.EventOrBuilder
    • getAttributesCount

      public int getAttributesCount()
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
      Specified by:
      getAttributesCount in interface Span.EventOrBuilder
    • getAttributes

      public KeyValue getAttributes(int index)
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
      Specified by:
      getAttributes in interface Span.EventOrBuilder
    • setAttributes

      public Span.Event.Builder setAttributes(int index, KeyValue value)
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • setAttributes

      public Span.Event.Builder setAttributes(int index, KeyValue.Builder builderForValue)
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • addAttributes

      public Span.Event.Builder addAttributes(KeyValue value)
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • addAttributes

      public Span.Event.Builder addAttributes(int index, KeyValue value)
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • addAttributes

      public Span.Event.Builder addAttributes(KeyValue.Builder builderForValue)
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • addAttributes

      public Span.Event.Builder addAttributes(int index, KeyValue.Builder builderForValue)
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • addAllAttributes

      public Span.Event.Builder addAllAttributes(Iterable<? extends KeyValue> values)
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • clearAttributes

      public Span.Event.Builder clearAttributes()
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • removeAttributes

      public Span.Event.Builder removeAttributes(int index)
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • getAttributesBuilder

      public KeyValue.Builder getAttributesBuilder(int index)
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • getAttributesOrBuilder

      public KeyValueOrBuilder getAttributesOrBuilder(int index)
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
      Specified by:
      getAttributesOrBuilder in interface Span.EventOrBuilder
    • getAttributesOrBuilderList

      public List<? extends KeyValueOrBuilder> getAttributesOrBuilderList()
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
      Specified by:
      getAttributesOrBuilderList in interface Span.EventOrBuilder
    • addAttributesBuilder

      public KeyValue.Builder addAttributesBuilder()
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • addAttributesBuilder

      public KeyValue.Builder addAttributesBuilder(int index)
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • getAttributesBuilderList

      public List<KeyValue.Builder> getAttributesBuilderList()
       attributes is 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 attribute values SHOULD NOT contain empty values.
       The attribute values SHOULD NOT contain bytes values.
       The attribute values SHOULD NOT contain array values different than array of string values, bool values, int values,
       double values.
       The attribute values SHOULD NOT contain kvlist values.
       The behavior of software that receives attributes containing such values can be unpredictable.
       These restrictions can change in a minor release.
       The restrictions take origin from the OpenTelemetry specification:
       https://github.com/open-telemetry/opentelemetry-specification/blob/v1.47.0/specification/common/README.md#attribute.
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 3;
    • getDroppedAttributesCount

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

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

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