Class Span.Attributes.Builder (2.9.0)

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Span.Attributes.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Span.Attributes.Builder
Overrides

build()

public Span.Attributes build()
Returns
TypeDescription
Span.Attributes

buildPartial()

public Span.Attributes buildPartial()
Returns
TypeDescription
Span.Attributes

clear()

public Span.Attributes.Builder clear()
Returns
TypeDescription
Span.Attributes.Builder
Overrides

clearAttributeMap()

public Span.Attributes.Builder clearAttributeMap()
Returns
TypeDescription
Span.Attributes.Builder

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 all attributes are valid.

int32 dropped_attributes_count = 2;

Returns
TypeDescription
Span.Attributes.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Span.Attributes.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Span.Attributes.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public Span.Attributes.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Span.Attributes.Builder
Overrides

clone()

public Span.Attributes.Builder clone()
Returns
TypeDescription
Span.Attributes.Builder
Overrides

containsAttributeMap(String key)

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
NameDescription
keyString
Returns
TypeDescription
boolean

getAttributeMap()

public Map<String,AttributeValue> getAttributeMap()

Use #getAttributeMapMap() instead.

Returns
TypeDescription
Map<String,AttributeValue>

getAttributeMapCount()

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
TypeDescription
int

getAttributeMapMap()

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
TypeDescription
Map<String,AttributeValue>

getAttributeMapOrDefault(String key, AttributeValue defaultValue)

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
NameDescription
keyString
defaultValueAttributeValue
Returns
TypeDescription
AttributeValue

getAttributeMapOrThrow(String key)

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
NameDescription
keyString
Returns
TypeDescription
AttributeValue

getDefaultInstanceForType()

public Span.Attributes getDefaultInstanceForType()
Returns
TypeDescription
Span.Attributes

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

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 all attributes are valid.

int32 dropped_attributes_count = 2;

Returns
TypeDescription
int

The droppedAttributesCount.

getMutableAttributeMap()

public Map<String,AttributeValue> getMutableAttributeMap()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,AttributeValue>

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(Span.Attributes other)

public Span.Attributes.Builder mergeFrom(Span.Attributes other)
Parameter
NameDescription
otherSpan.Attributes
Returns
TypeDescription
Span.Attributes.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Span.Attributes.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Span.Attributes.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public Span.Attributes.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Span.Attributes.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Span.Attributes.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Span.Attributes.Builder
Overrides

putAllAttributeMap(Map<String,AttributeValue> values)

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
NameDescription
valuesMap<String,AttributeValue>
Returns
TypeDescription
Span.Attributes.Builder

putAttributeMap(String key, AttributeValue value)

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
NameDescription
keyString
valueAttributeValue
Returns
TypeDescription
Span.Attributes.Builder

removeAttributeMap(String key)

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
NameDescription
keyString
Returns
TypeDescription
Span.Attributes.Builder

setDroppedAttributesCount(int value)

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
NameDescription
valueint

The droppedAttributesCount to set.

Returns
TypeDescription
Span.Attributes.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Span.Attributes.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Span.Attributes.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Span.Attributes.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
Span.Attributes.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Span.Attributes.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Span.Attributes.Builder
Overrides