Class Span.Link (2.27.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
TypeDescription
int
public static final int SPAN_ID_FIELD_NUMBER
Field Value
TypeDescription
int
public static final int TRACE_ID_FIELD_NUMBER
Field Value
TypeDescription
int
public static final int TYPE_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

public static Span.Link getDefaultInstance()
Returns
TypeDescription
Span.Link
public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor
public static Span.Link.Builder newBuilder()
Returns
TypeDescription
Span.Link.Builder
public static Span.Link.Builder newBuilder(Span.Link prototype)
Parameter
NameDescription
prototypeSpan.Link
Returns
TypeDescription
Span.Link.Builder
public static Span.Link parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Span.Link
Exceptions
TypeDescription
IOException
public static Span.Link parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Span.Link
Exceptions
TypeDescription
IOException
public static Span.Link parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
Span.Link
Exceptions
TypeDescription
InvalidProtocolBufferException
public static Span.Link parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Span.Link
Exceptions
TypeDescription
InvalidProtocolBufferException
public static Span.Link parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
Span.Link
Exceptions
TypeDescription
InvalidProtocolBufferException
public static Span.Link parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Span.Link
Exceptions
TypeDescription
InvalidProtocolBufferException
public static Span.Link parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
Span.Link
Exceptions
TypeDescription
IOException
public static Span.Link parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Span.Link
Exceptions
TypeDescription
IOException
public static Span.Link parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
Span.Link
Exceptions
TypeDescription
IOException
public static Span.Link parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Span.Link
Exceptions
TypeDescription
IOException
public static Span.Link parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
Span.Link
Exceptions
TypeDescription
InvalidProtocolBufferException
public static Span.Link parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Span.Link
Exceptions
TypeDescription
InvalidProtocolBufferException
public static Parser<Span.Link> parser()
Returns
TypeDescription
Parser<Link>

Methods

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
Span.AttributesOrBuilder
public Span.Link getDefaultInstanceForType()
Returns
TypeDescription
Span.Link
public Parser<Span.Link> getParserForType()
Returns
TypeDescription
Parser<Link>
Overrides
public int getSerializedSize()
Returns
TypeDescription
int
Overrides
public String getSpanId()

The [SPAN_ID] for a span within a trace.

string span_id = 2;

Returns
TypeDescription
String

The spanId.

public ByteString getSpanIdBytes()

The [SPAN_ID] for a span within a trace.

string span_id = 2;

Returns
TypeDescription
ByteString

The bytes for spanId.

public String getTraceId()

The [TRACE_ID] for a trace within a project.

string trace_id = 1;

Returns
TypeDescription
String

The traceId.

public ByteString getTraceIdBytes()

The [TRACE_ID] for a trace within a project.

string trace_id = 1;

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

Whether the attributes field is set.

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