Class SpanContext.Builder (3.2.10)

public static final class SpanContext.Builder extends GeneratedMessageV3.Builder<SpanContext.Builder> implements SpanContextOrBuilder

The context of a span. This is attached to an Exemplar in Distribution values during aggregation. It contains the name of a span with format: projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID]

Protobuf type google.monitoring.v3.SpanContext

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public SpanContext build()
Returns
TypeDescription
SpanContext

buildPartial()

public SpanContext buildPartial()
Returns
TypeDescription
SpanContext

clear()

public SpanContext.Builder clear()
Returns
TypeDescription
SpanContext.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

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

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSpanName()

public SpanContext.Builder clearSpanName()

The resource name of the span. The format is: projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] [TRACE_ID] is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. [SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array.

string span_name = 1;

Returns
TypeDescription
SpanContext.Builder

This builder for chaining.

clone()

public SpanContext.Builder clone()
Returns
TypeDescription
SpanContext.Builder
Overrides

getDefaultInstanceForType()

public SpanContext getDefaultInstanceForType()
Returns
TypeDescription
SpanContext

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getSpanName()

public String getSpanName()

The resource name of the span. The format is: projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] [TRACE_ID] is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. [SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array.

string span_name = 1;

Returns
TypeDescription
String

The spanName.

getSpanNameBytes()

public ByteString getSpanNameBytes()

The resource name of the span. The format is: projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] [TRACE_ID] is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. [SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array.

string span_name = 1;

Returns
TypeDescription
ByteString

The bytes for spanName.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(SpanContext other)

public SpanContext.Builder mergeFrom(SpanContext other)
Parameter
NameDescription
otherSpanContext
Returns
TypeDescription
SpanContext.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

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

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

setSpanName(String value)

public SpanContext.Builder setSpanName(String value)

The resource name of the span. The format is: projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] [TRACE_ID] is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. [SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array.

string span_name = 1;

Parameter
NameDescription
valueString

The spanName to set.

Returns
TypeDescription
SpanContext.Builder

This builder for chaining.

setSpanNameBytes(ByteString value)

public SpanContext.Builder setSpanNameBytes(ByteString value)

The resource name of the span. The format is: projects/[PROJECT_ID_OR_NUMBER]/traces/[TRACE_ID]/spans/[SPAN_ID] [TRACE_ID] is a unique identifier for a trace within a project; it is a 32-character hexadecimal encoding of a 16-byte array. [SPAN_ID] is a unique identifier for a span within a trace; it is a 16-character hexadecimal encoding of an 8-byte array.

string span_name = 1;

Parameter
NameDescription
valueByteString

The bytes for spanName to set.

Returns
TypeDescription
SpanContext.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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