public static final class Span.Attributes.Builder extends GeneratedMessageV3.Builder<Span.Attributes.Builder> implements Span.AttributesOrBuilder
A set of attributes, each in the format [KEY]:[VALUE]
.
Protobuf type google.devtools.cloudtrace.v2.Span.Attributes
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
public Span.Attributes.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
public Span.Attributes build()
Returns
public Span.Attributes buildPartial()
Returns
public Span.Attributes.Builder clear()
Returns
Overrides
public Span.Attributes.Builder clearAttributeMap()
Returns
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 all attributes are valid.
int32 dropped_attributes_count = 2;
Returns
public Span.Attributes.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
public Span.Attributes.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
public Span.Attributes.Builder clone()
Returns
Overrides
public boolean containsAttributeMap(String key)
The set of attributes. Each attribute's key can be up to 128 bytes
long. The value can be a string up to 256 bytes, a signed 64-bit integer,
or the Boolean values true
and false
. For example:
"/instance_id": { "string_value": { "value": "my-instance" } }
"/http/request_bytes": { "int_value": 300 }
"example.com/myattribute": { "bool_value": false }
map<string, .google.devtools.cloudtrace.v2.AttributeValue> attribute_map = 1;
Parameter
Returns
public Map<String,AttributeValue> getAttributeMap()
Returns
public int getAttributeMapCount()
The set of attributes. Each attribute's key can be up to 128 bytes
long. The value can be a string up to 256 bytes, a signed 64-bit integer,
or the Boolean values true
and false
. For example:
"/instance_id": { "string_value": { "value": "my-instance" } }
"/http/request_bytes": { "int_value": 300 }
"example.com/myattribute": { "bool_value": false }
map<string, .google.devtools.cloudtrace.v2.AttributeValue> attribute_map = 1;
Returns
public Map<String,AttributeValue> getAttributeMapMap()
The set of attributes. Each attribute's key can be up to 128 bytes
long. The value can be a string up to 256 bytes, a signed 64-bit integer,
or the Boolean values true
and false
. For example:
"/instance_id": { "string_value": { "value": "my-instance" } }
"/http/request_bytes": { "int_value": 300 }
"example.com/myattribute": { "bool_value": false }
map<string, .google.devtools.cloudtrace.v2.AttributeValue> attribute_map = 1;
Returns
public AttributeValue getAttributeMapOrDefault(String key, AttributeValue defaultValue)
The set of attributes. Each attribute's key can be up to 128 bytes
long. The value can be a string up to 256 bytes, a signed 64-bit integer,
or the Boolean values true
and false
. For example:
"/instance_id": { "string_value": { "value": "my-instance" } }
"/http/request_bytes": { "int_value": 300 }
"example.com/myattribute": { "bool_value": false }
map<string, .google.devtools.cloudtrace.v2.AttributeValue> attribute_map = 1;
Parameters
Returns
public AttributeValue getAttributeMapOrThrow(String key)
The set of attributes. Each attribute's key can be up to 128 bytes
long. The value can be a string up to 256 bytes, a signed 64-bit integer,
or the Boolean values true
and false
. For example:
"/instance_id": { "string_value": { "value": "my-instance" } }
"/http/request_bytes": { "int_value": 300 }
"example.com/myattribute": { "bool_value": false }
map<string, .google.devtools.cloudtrace.v2.AttributeValue> attribute_map = 1;
Parameter
Returns
public Span.Attributes getDefaultInstanceForType()
Returns
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
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 all attributes are valid.
int32 dropped_attributes_count = 2;
Returns
Type | Description |
int | The droppedAttributesCount.
|
public Map<String,AttributeValue> getMutableAttributeMap()
Use alternate mutation accessors instead.
Returns
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
protected MapField internalGetMutableMapField(int number)
Parameter
Returns
Overrides
public final boolean isInitialized()
Returns
Overrides
public Span.Attributes.Builder mergeFrom(Span.Attributes other)
Parameter
Returns
public Span.Attributes.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
public Span.Attributes.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
public final Span.Attributes.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
public Span.Attributes.Builder putAllAttributeMap(Map<String,AttributeValue> values)
The set of attributes. Each attribute's key can be up to 128 bytes
long. The value can be a string up to 256 bytes, a signed 64-bit integer,
or the Boolean values true
and false
. For example:
"/instance_id": { "string_value": { "value": "my-instance" } }
"/http/request_bytes": { "int_value": 300 }
"example.com/myattribute": { "bool_value": false }
map<string, .google.devtools.cloudtrace.v2.AttributeValue> attribute_map = 1;
Parameter
Returns
public Span.Attributes.Builder putAttributeMap(String key, AttributeValue value)
The set of attributes. Each attribute's key can be up to 128 bytes
long. The value can be a string up to 256 bytes, a signed 64-bit integer,
or the Boolean values true
and false
. For example:
"/instance_id": { "string_value": { "value": "my-instance" } }
"/http/request_bytes": { "int_value": 300 }
"example.com/myattribute": { "bool_value": false }
map<string, .google.devtools.cloudtrace.v2.AttributeValue> attribute_map = 1;
Parameters
Returns
public Span.Attributes.Builder removeAttributeMap(String key)
The set of attributes. Each attribute's key can be up to 128 bytes
long. The value can be a string up to 256 bytes, a signed 64-bit integer,
or the Boolean values true
and false
. For example:
"/instance_id": { "string_value": { "value": "my-instance" } }
"/http/request_bytes": { "int_value": 300 }
"example.com/myattribute": { "bool_value": false }
map<string, .google.devtools.cloudtrace.v2.AttributeValue> attribute_map = 1;
Parameter
Returns
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 all attributes are valid.
int32 dropped_attributes_count = 2;
Parameter
Name | Description |
value | int
The droppedAttributesCount to set.
|
Returns
public Span.Attributes.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
public Span.Attributes.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
public final Span.Attributes.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides