public static final class SpanContext.Builder extends GeneratedMessage.Builder<SpanContext.Builder> implements SpanContextOrBuilderThe 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
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > SpanContext.BuilderImplements
SpanContextOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public SpanContext build()| Returns | |
|---|---|
| Type | Description |
SpanContext |
|
buildPartial()
public SpanContext buildPartial()| Returns | |
|---|---|
| Type | Description |
SpanContext |
|
clear()
public SpanContext.Builder clear()| Returns | |
|---|---|
| Type | Description |
SpanContext.Builder |
|
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 | |
|---|---|
| Type | Description |
SpanContext.Builder |
This builder for chaining. |
getDefaultInstanceForType()
public SpanContext getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
SpanContext |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
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 | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Type | Description |
ByteString |
The bytes for spanName. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(SpanContext other)
public SpanContext.Builder mergeFrom(SpanContext other)| Parameter | |
|---|---|
| Name | Description |
other |
SpanContext |
| Returns | |
|---|---|
| Type | Description |
SpanContext.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public SpanContext.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
SpanContext.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public SpanContext.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
SpanContext.Builder |
|
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 | |
|---|---|
| Name | Description |
value |
StringThe spanName to set. |
| Returns | |
|---|---|
| Type | Description |
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 | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for spanName to set. |
| Returns | |
|---|---|
| Type | Description |
SpanContext.Builder |
This builder for chaining. |