Class Span.Attributes.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Span.AttributesOrBuilder, Cloneable
    Enclosing class:
    Span.Attributes

    public static final class Span.Attributes.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Span.Attributes.Builder>
    implements Span.AttributesOrBuilder
     A set of attributes, each with a key and a value.
     
    Protobuf type opencensus.proto.trace.v1.Span.Attributes
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.MapField internalGetMapField​(int number)
        Overrides:
        internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Attributes.Builder>
      • internalGetMutableMapField

        protected com.google.protobuf.MapField internalGetMutableMapField​(int number)
        Overrides:
        internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Attributes.Builder>
      • internalGetFieldAccessorTable

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

        public Span.Attributes.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.GeneratedMessageV3.Builder<Span.Attributes.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.GeneratedMessageV3.Builder<Span.Attributes.Builder>
      • getDefaultInstanceForType

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

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

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

        public Span.Attributes.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Attributes.Builder>
      • setField

        public Span.Attributes.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Attributes.Builder>
      • clearField

        public Span.Attributes.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Attributes.Builder>
      • clearOneof

        public Span.Attributes.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Attributes.Builder>
      • setRepeatedField

        public Span.Attributes.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                        int index,
                                                        Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Attributes.Builder>
      • addRepeatedField

        public Span.Attributes.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                        Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Attributes.Builder>
      • mergeFrom

        public Span.Attributes.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.Attributes.Builder>
      • isInitialized

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

        public Span.Attributes.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.Attributes.Builder>
        Throws:
        IOException
      • getAttributeMapCount

        public int getAttributeMapCount()
        Description copied from interface: Span.AttributesOrBuilder
         The set of attributes. The value can be a string, an integer, a double
         or the Boolean values `true` or `false`. Note, global attributes like 
         server name can be set as tags using resource API. Examples of attributes:
             "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
             "/http/server_latency": 300
             "abc.com/myattribute": true
             "abc.com/score": 10.239
         
        map<string, .opencensus.proto.trace.v1.AttributeValue> attribute_map = 1;
        Specified by:
        getAttributeMapCount in interface Span.AttributesOrBuilder
      • containsAttributeMap

        public boolean containsAttributeMap​(String key)
         The set of attributes. The value can be a string, an integer, a double
         or the Boolean values `true` or `false`. Note, global attributes like 
         server name can be set as tags using resource API. Examples of attributes:
             "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
             "/http/server_latency": 300
             "abc.com/myattribute": true
             "abc.com/score": 10.239
         
        map<string, .opencensus.proto.trace.v1.AttributeValue> attribute_map = 1;
        Specified by:
        containsAttributeMap in interface Span.AttributesOrBuilder
      • getAttributeMapMap

        public Map<String,​AttributeValue> getAttributeMapMap()
         The set of attributes. The value can be a string, an integer, a double
         or the Boolean values `true` or `false`. Note, global attributes like 
         server name can be set as tags using resource API. Examples of attributes:
             "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
             "/http/server_latency": 300
             "abc.com/myattribute": true
             "abc.com/score": 10.239
         
        map<string, .opencensus.proto.trace.v1.AttributeValue> attribute_map = 1;
        Specified by:
        getAttributeMapMap in interface Span.AttributesOrBuilder
      • getAttributeMapOrDefault

        public AttributeValue getAttributeMapOrDefault​(String key,
                                                       AttributeValue defaultValue)
         The set of attributes. The value can be a string, an integer, a double
         or the Boolean values `true` or `false`. Note, global attributes like 
         server name can be set as tags using resource API. Examples of attributes:
             "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
             "/http/server_latency": 300
             "abc.com/myattribute": true
             "abc.com/score": 10.239
         
        map<string, .opencensus.proto.trace.v1.AttributeValue> attribute_map = 1;
        Specified by:
        getAttributeMapOrDefault in interface Span.AttributesOrBuilder
      • getAttributeMapOrThrow

        public AttributeValue getAttributeMapOrThrow​(String key)
         The set of attributes. The value can be a string, an integer, a double
         or the Boolean values `true` or `false`. Note, global attributes like 
         server name can be set as tags using resource API. Examples of attributes:
             "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
             "/http/server_latency": 300
             "abc.com/myattribute": true
             "abc.com/score": 10.239
         
        map<string, .opencensus.proto.trace.v1.AttributeValue> attribute_map = 1;
        Specified by:
        getAttributeMapOrThrow in interface Span.AttributesOrBuilder
      • removeAttributeMap

        public Span.Attributes.Builder removeAttributeMap​(String key)
         The set of attributes. The value can be a string, an integer, a double
         or the Boolean values `true` or `false`. Note, global attributes like 
         server name can be set as tags using resource API. Examples of attributes:
             "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
             "/http/server_latency": 300
             "abc.com/myattribute": true
             "abc.com/score": 10.239
         
        map<string, .opencensus.proto.trace.v1.AttributeValue> attribute_map = 1;
      • putAttributeMap

        public Span.Attributes.Builder putAttributeMap​(String key,
                                                       AttributeValue value)
         The set of attributes. The value can be a string, an integer, a double
         or the Boolean values `true` or `false`. Note, global attributes like 
         server name can be set as tags using resource API. Examples of attributes:
             "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
             "/http/server_latency": 300
             "abc.com/myattribute": true
             "abc.com/score": 10.239
         
        map<string, .opencensus.proto.trace.v1.AttributeValue> attribute_map = 1;
      • putAllAttributeMap

        public Span.Attributes.Builder putAllAttributeMap​(Map<String,​AttributeValue> values)
         The set of attributes. The value can be a string, an integer, a double
         or the Boolean values `true` or `false`. Note, global attributes like 
         server name can be set as tags using resource API. Examples of attributes:
             "/http/user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
             "/http/server_latency": 300
             "abc.com/myattribute": true
             "abc.com/score": 10.239
         
        map<string, .opencensus.proto.trace.v1.AttributeValue> attribute_map = 1;
      • 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.
         
        int32 dropped_attributes_count = 2;
        Specified by:
        getDroppedAttributesCount in interface Span.AttributesOrBuilder
        Returns:
        The droppedAttributesCount.
      • setDroppedAttributesCount

        public Span.Attributes.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.
         
        int32 dropped_attributes_count = 2;
        Parameters:
        value - The droppedAttributesCount to set.
        Returns:
        This builder for chaining.
      • clearDroppedAttributesCount

        public Span.Attributes.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.
         
        int32 dropped_attributes_count = 2;
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Span.Attributes.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Attributes.Builder>
      • mergeUnknownFields

        public final Span.Attributes.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Span.Attributes.Builder>