Class Span.Link.Builder (2.15.0)

public static final class Span.Link.Builder extends GeneratedMessageV3.Builder<Span.Link.Builder> 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 Methods

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

Methods

public Span.Link.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
Span.Link.Builder
Overrides
public Span.Link build()
Returns
TypeDescription
Span.Link
public Span.Link buildPartial()
Returns
TypeDescription
Span.Link
public Span.Link.Builder clear()
Returns
TypeDescription
Span.Link.Builder
Overrides
public Span.Link.Builder clearAttributes()

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.Link.Builder
public Span.Link.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
Span.Link.Builder
Overrides
public Span.Link.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
Span.Link.Builder
Overrides
public Span.Link.Builder clearSpanId()

The [SPAN_ID] for a span within a trace.

string span_id = 2;

Returns
TypeDescription
Span.Link.Builder

This builder for chaining.

public Span.Link.Builder clearTraceId()

The [TRACE_ID] for a trace within a project.

string trace_id = 1;

Returns
TypeDescription
Span.Link.Builder

This builder for chaining.

public Span.Link.Builder clearType()

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

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

Returns
TypeDescription
Span.Link.Builder

This builder for chaining.

public Span.Link.Builder clone()
Returns
TypeDescription
Span.Link.Builder
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.Attributes.Builder getAttributesBuilder()

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.Builder
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 Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
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.

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides
public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides
public Span.Link.Builder mergeAttributes(Span.Attributes value)

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

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

Parameter
NameDescription
valueSpan.Attributes
Returns
TypeDescription
Span.Link.Builder
public Span.Link.Builder mergeFrom(Span.Link other)
Parameter
NameDescription
otherSpan.Link
Returns
TypeDescription
Span.Link.Builder
public Span.Link.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
Span.Link.Builder
Overrides
Exceptions
TypeDescription
IOException
public Span.Link.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
Span.Link.Builder
Overrides
public final Span.Link.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
Span.Link.Builder
Overrides
public Span.Link.Builder setAttributes(Span.Attributes value)

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

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

Parameter
NameDescription
valueSpan.Attributes
Returns
TypeDescription
Span.Link.Builder
public Span.Link.Builder setAttributes(Span.Attributes.Builder builderForValue)

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

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

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

The [SPAN_ID] for a span within a trace.

string span_id = 2;

Parameter
NameDescription
valueString

The spanId to set.

Returns
TypeDescription
Span.Link.Builder

This builder for chaining.

public Span.Link.Builder setSpanIdBytes(ByteString value)

The [SPAN_ID] for a span within a trace.

string span_id = 2;

Parameter
NameDescription
valueByteString

The bytes for spanId to set.

Returns
TypeDescription
Span.Link.Builder

This builder for chaining.

public Span.Link.Builder setTraceId(String value)

The [TRACE_ID] for a trace within a project.

string trace_id = 1;

Parameter
NameDescription
valueString

The traceId to set.

Returns
TypeDescription
Span.Link.Builder

This builder for chaining.

public Span.Link.Builder setTraceIdBytes(ByteString value)

The [TRACE_ID] for a trace within a project.

string trace_id = 1;

Parameter
NameDescription
valueByteString

The bytes for traceId to set.

Returns
TypeDescription
Span.Link.Builder

This builder for chaining.

public Span.Link.Builder setType(Span.Link.Type value)

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

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

Parameter
NameDescription
valueSpan.Link.Type

The type to set.

Returns
TypeDescription
Span.Link.Builder

This builder for chaining.

public Span.Link.Builder setTypeValue(int value)

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

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

Parameter
NameDescription
valueint

The enum numeric value on the wire for type to set.

Returns
TypeDescription
Span.Link.Builder

This builder for chaining.

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