Class InstrumentationScope.Builder

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

public static final class InstrumentationScope.Builder extends com.google.protobuf.GeneratedMessageLite.Builder<InstrumentationScope,InstrumentationScope.Builder> implements InstrumentationScopeOrBuilder
 InstrumentationScope is a message representing the instrumentation scope information
 such as the fully qualified name and version.
 
Protobuf type opentelemetry.proto.common.v1.InstrumentationScope
  • Method Details

    • getName

      public String getName()
       A name denoting the Instrumentation scope.
       An empty instrumentation scope name means the name is unknown.
       
      string name = 1 [json_name = "name"];
      Specified by:
      getName in interface InstrumentationScopeOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       A name denoting the Instrumentation scope.
       An empty instrumentation scope name means the name is unknown.
       
      string name = 1 [json_name = "name"];
      Specified by:
      getNameBytes in interface InstrumentationScopeOrBuilder
      Returns:
      The bytes for name.
    • setName

      public InstrumentationScope.Builder setName(String value)
       A name denoting the Instrumentation scope.
       An empty instrumentation scope name means the name is unknown.
       
      string name = 1 [json_name = "name"];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public InstrumentationScope.Builder clearName()
       A name denoting the Instrumentation scope.
       An empty instrumentation scope name means the name is unknown.
       
      string name = 1 [json_name = "name"];
      Returns:
      This builder for chaining.
    • setNameBytes

      public InstrumentationScope.Builder setNameBytes(com.google.protobuf.ByteString value)
       A name denoting the Instrumentation scope.
       An empty instrumentation scope name means the name is unknown.
       
      string name = 1 [json_name = "name"];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getVersion

      public String getVersion()
       Defines the version of the instrumentation scope.
       An empty instrumentation scope version means the version is unknown.
       
      string version = 2 [json_name = "version"];
      Specified by:
      getVersion in interface InstrumentationScopeOrBuilder
      Returns:
      The version.
    • getVersionBytes

      public com.google.protobuf.ByteString getVersionBytes()
       Defines the version of the instrumentation scope.
       An empty instrumentation scope version means the version is unknown.
       
      string version = 2 [json_name = "version"];
      Specified by:
      getVersionBytes in interface InstrumentationScopeOrBuilder
      Returns:
      The bytes for version.
    • setVersion

      public InstrumentationScope.Builder setVersion(String value)
       Defines the version of the instrumentation scope.
       An empty instrumentation scope version means the version is unknown.
       
      string version = 2 [json_name = "version"];
      Parameters:
      value - The version to set.
      Returns:
      This builder for chaining.
    • clearVersion

      public InstrumentationScope.Builder clearVersion()
       Defines the version of the instrumentation scope.
       An empty instrumentation scope version means the version is unknown.
       
      string version = 2 [json_name = "version"];
      Returns:
      This builder for chaining.
    • setVersionBytes

      public InstrumentationScope.Builder setVersionBytes(com.google.protobuf.ByteString value)
       Defines the version of the instrumentation scope.
       An empty instrumentation scope version means the version is unknown.
       
      string version = 2 [json_name = "version"];
      Parameters:
      value - The bytes for version to set.
      Returns:
      This builder for chaining.
    • getAttributesList

      public List<KeyValue> getAttributesList()
       Additional attributes that describe the scope. [Optional].
       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 InstrumentationScopeOrBuilder
    • getAttributesCount

      public int getAttributesCount()
       Additional attributes that describe the scope. [Optional].
       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 InstrumentationScopeOrBuilder
    • getAttributes

      public KeyValue getAttributes(int index)
       Additional attributes that describe the scope. [Optional].
       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 InstrumentationScopeOrBuilder
    • setAttributes

      public InstrumentationScope.Builder setAttributes(int index, KeyValue value)
       Additional attributes that describe the scope. [Optional].
       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 InstrumentationScope.Builder setAttributes(int index, KeyValue.Builder builderForValue)
       Additional attributes that describe the scope. [Optional].
       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 InstrumentationScope.Builder addAttributes(KeyValue value)
       Additional attributes that describe the scope. [Optional].
       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 InstrumentationScope.Builder addAttributes(int index, KeyValue value)
       Additional attributes that describe the scope. [Optional].
       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 InstrumentationScope.Builder addAttributes(KeyValue.Builder builderForValue)
       Additional attributes that describe the scope. [Optional].
       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 InstrumentationScope.Builder addAttributes(int index, KeyValue.Builder builderForValue)
       Additional attributes that describe the scope. [Optional].
       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 InstrumentationScope.Builder addAllAttributes(Iterable<? extends KeyValue> values)
       Additional attributes that describe the scope. [Optional].
       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 InstrumentationScope.Builder clearAttributes()
       Additional attributes that describe the scope. [Optional].
       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 InstrumentationScope.Builder removeAttributes(int index)
       Additional attributes that describe the scope. [Optional].
       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 attributes that were discarded. Attributes
       can be discarded because their keys are too long or because there are too many
       attributes. If this value is 0, then no attributes were dropped.
       
      uint32 dropped_attributes_count = 4 [json_name = "droppedAttributesCount"];
      Specified by:
      getDroppedAttributesCount in interface InstrumentationScopeOrBuilder
      Returns:
      The droppedAttributesCount.
    • setDroppedAttributesCount

      public InstrumentationScope.Builder setDroppedAttributesCount(int value)
       The number of attributes that were discarded. Attributes
       can be discarded because their keys are too long or because there are too many
       attributes. If this 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 InstrumentationScope.Builder clearDroppedAttributesCount()
       The number of attributes that were discarded. Attributes
       can be discarded because their keys are too long or because there are too many
       attributes. If this value is 0, then no attributes were dropped.
       
      uint32 dropped_attributes_count = 4 [json_name = "droppedAttributesCount"];
      Returns:
      This builder for chaining.