public static final class Span.Attributes.Builder extends GeneratedMessageV3.Builder<Span.Attributes.Builder> implements Span.AttributesOrBuilder
A set of attributes as key-value pairs.
Protobuf type google.devtools.cloudtrace.v2.Span.Attributes
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
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()
Methods
public Span.Attributes.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
public Span.Attributes build()
public Span.Attributes buildPartial()
public Span.Attributes.Builder clear()
Overrides
public Span.Attributes.Builder clearAttributeMap()
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;
public Span.Attributes.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
public Span.Attributes.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
public Span.Attributes.Builder clone()
Overrides
public boolean containsAttributeMap(String key)
A 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
or 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 |
---|
Name | Description |
key | String
|
public Map<String,AttributeValue> getAttributeMap()
public int getAttributeMapCount()
A 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
or 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 |
---|
Type | Description |
int | |
public Map<String,AttributeValue> getAttributeMapMap()
A 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
or 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;
public AttributeValue getAttributeMapOrDefault(String key, AttributeValue defaultValue)
A 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
or 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;
public AttributeValue getAttributeMapOrThrow(String key)
A 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
or 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 |
---|
Name | Description |
key | String
|
public Span.Attributes getDefaultInstanceForType()
public Descriptors.Descriptor getDescriptorForType()
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.
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter |
---|
Name | Description |
number | int
|
Returns |
---|
Type | Description |
com.google.protobuf.MapFieldReflectionAccessor | |
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter |
---|
Name | Description |
number | int
|
Returns |
---|
Type | Description |
com.google.protobuf.MapFieldReflectionAccessor | |
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
public final boolean isInitialized()
Overrides
public Span.Attributes.Builder mergeFrom(Span.Attributes other)
public Span.Attributes.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
public Span.Attributes.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
public final Span.Attributes.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
public Span.Attributes.Builder putAllAttributeMap(Map<String,AttributeValue> values)
A 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
or 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;
public Span.Attributes.Builder putAttributeMap(String key, AttributeValue value)
A 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
or 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;
public AttributeValue.Builder putAttributeMapBuilderIfAbsent(String key)
A 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
or 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 |
---|
Name | Description |
key | String
|
public Span.Attributes.Builder removeAttributeMap(String key)
A 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
or 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 |
---|
Name | Description |
key | String
|
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.
|
public Span.Attributes.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
public Span.Attributes.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
public final Span.Attributes.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides