Class Span.Link (2.54.0)

public static final class Span.Link extends GeneratedMessageV3 implements Span.LinkOrBuilder

A pointer from the current span to another span in the same trace or in a different trace. For example, this can be used in batching operations, where a single batch handler processes multiple requests from different traces or when the handler receives a request from a different project.

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

Implements

Span.LinkOrBuilder

Static Fields

public static final int ATTRIBUTES_FIELD_NUMBER
Field Value
Type Description
int
public static final int SPAN_ID_FIELD_NUMBER
Field Value
Type Description
int
public static final int TRACE_ID_FIELD_NUMBER
Field Value
Type Description
int
public static final int TYPE_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

public static Span.Link getDefaultInstance()
Returns
Type Description
Span.Link
public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor
public static Span.Link.Builder newBuilder()
Returns
Type Description
Span.Link.Builder
public static Span.Link.Builder newBuilder(Span.Link prototype)
Parameter
Name Description
prototype Span.Link
Returns
Type Description
Span.Link.Builder
public static Span.Link parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Span.Link
Exceptions
Type Description
IOException
public static Span.Link parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Span.Link
Exceptions
Type Description
IOException
public static Span.Link parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
Span.Link
Exceptions
Type Description
InvalidProtocolBufferException
public static Span.Link parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Span.Link
Exceptions
Type Description
InvalidProtocolBufferException
public static Span.Link parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
Span.Link
Exceptions
Type Description
InvalidProtocolBufferException
public static Span.Link parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Span.Link
Exceptions
Type Description
InvalidProtocolBufferException
public static Span.Link parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
Span.Link
Exceptions
Type Description
IOException
public static Span.Link parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Span.Link
Exceptions
Type Description
IOException
public static Span.Link parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
Span.Link
Exceptions
Type Description
IOException
public static Span.Link parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Span.Link
Exceptions
Type Description
IOException
public static Span.Link parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
Span.Link
Exceptions
Type Description
InvalidProtocolBufferException
public static Span.Link parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Span.Link
Exceptions
Type Description
InvalidProtocolBufferException
public static Parser<Span.Link> parser()
Returns
Type Description
Parser<Link>

Methods

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides
public Span.Attributes getAttributes()

A set of attributes on the link. Up to 32 attributes can be specified per link.

.google.devtools.cloudtrace.v2.Span.Attributes attributes = 4;

Returns
Type Description
Span.Attributes

The attributes.

public Span.AttributesOrBuilder getAttributesOrBuilder()

A set of attributes on the link. Up to 32 attributes can be specified per link.

.google.devtools.cloudtrace.v2.Span.Attributes attributes = 4;

Returns
Type Description
Span.AttributesOrBuilder
public Span.Link getDefaultInstanceForType()
Returns
Type Description
Span.Link
public Parser<Span.Link> getParserForType()
Returns
Type Description
Parser<Link>
Overrides
public int getSerializedSize()
Returns
Type Description
int
Overrides
public String getSpanId()

The [SPAN_ID] for a span within a trace.

string span_id = 2;

Returns
Type Description
String

The spanId.

public ByteString getSpanIdBytes()

The [SPAN_ID] for a span within a trace.

string span_id = 2;

Returns
Type Description
ByteString

The bytes for spanId.

public String getTraceId()

The [TRACE_ID] for a trace within a project.

string trace_id = 1;

Returns
Type Description
String

The traceId.

public ByteString getTraceIdBytes()

The [TRACE_ID] for a trace within a project.

string trace_id = 1;

Returns
Type Description
ByteString

The bytes for traceId.

public Span.Link.Type getType()

The relationship of the current span relative to the linked span.

.google.devtools.cloudtrace.v2.Span.Link.Type type = 3;

Returns
Type Description
Span.Link.Type

The type.

public int getTypeValue()

The relationship of the current span relative to the linked span.

.google.devtools.cloudtrace.v2.Span.Link.Type type = 3;

Returns
Type Description
int

The enum numeric value on the wire for type.

public boolean hasAttributes()

A set of attributes on the link. Up to 32 attributes can be specified per link.

.google.devtools.cloudtrace.v2.Span.Attributes attributes = 4;

Returns
Type Description
boolean

Whether the attributes field is set.

public int hashCode()
Returns
Type Description
int
Overrides
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides
public final boolean isInitialized()
Returns
Type Description
boolean
Overrides
public Span.Link.Builder newBuilderForType()
Returns
Type Description
Span.Link.Builder
protected Span.Link.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
Span.Link.Builder
Overrides
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides
public Span.Link.Builder toBuilder()
Returns
Type Description
Span.Link.Builder
public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException