Class Span.Attributes (2.47.0)

public static final class Span.Attributes extends GeneratedMessageV3 implements Span.AttributesOrBuilder

A set of attributes as key-value pairs.

Protobuf type google.devtools.cloudtrace.v2.Span.Attributes

Static Fields

ATTRIBUTE_MAP_FIELD_NUMBER

public static final int ATTRIBUTE_MAP_FIELD_NUMBER
Field Value
Type Description
int

DROPPED_ATTRIBUTES_COUNT_FIELD_NUMBER

public static final int DROPPED_ATTRIBUTES_COUNT_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static Span.Attributes getDefaultInstance()
Returns
Type Description
Span.Attributes

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static Span.Attributes.Builder newBuilder()
Returns
Type Description
Span.Attributes.Builder

newBuilder(Span.Attributes prototype)

public static Span.Attributes.Builder newBuilder(Span.Attributes prototype)
Parameter
Name Description
prototype Span.Attributes
Returns
Type Description
Span.Attributes.Builder

parseDelimitedFrom(InputStream input)

public static Span.Attributes parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Span.Attributes
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Span.Attributes parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Span.Attributes
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static Span.Attributes parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Span.Attributes
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static Span.Attributes parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Span.Attributes
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static Span.Attributes parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Span.Attributes
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static Span.Attributes parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Span.Attributes
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static Span.Attributes parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Span.Attributes
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static Span.Attributes parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Span.Attributes
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static Span.Attributes parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Span.Attributes
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static Span.Attributes parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Span.Attributes
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static Span.Attributes parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Span.Attributes
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static Span.Attributes parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Span.Attributes
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<Span.Attributes> parser()
Returns
Type Description
Parser<Attributes>

Methods

containsAttributeMap(String key)

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
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAttributeMap() (deprecated)

public Map<String,AttributeValue> getAttributeMap()

Use #getAttributeMapMap() instead.

Returns
Type Description
Map<String,AttributeValue>

getAttributeMapCount()

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

getAttributeMapMap()

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;

Returns
Type Description
Map<String,AttributeValue>

getAttributeMapOrDefault(String key, AttributeValue defaultValue)

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;

Parameters
Name Description
key String
defaultValue AttributeValue
Returns
Type Description
AttributeValue

getAttributeMapOrThrow(String key)

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
Returns
Type Description
AttributeValue

getDefaultInstanceForType()

public Span.Attributes getDefaultInstanceForType()
Returns
Type Description
Span.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 all attributes are valid.

int32 dropped_attributes_count = 2;

Returns
Type Description
int

The droppedAttributesCount.

getParserForType()

public Parser<Span.Attributes> getParserForType()
Returns
Type Description
Parser<Attributes>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public Span.Attributes.Builder newBuilderForType()
Returns
Type Description
Span.Attributes.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected Span.Attributes.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Span.Attributes.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public Span.Attributes.Builder toBuilder()
Returns
Type Description
Span.Attributes.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException