public static final class Trace.Builder extends GeneratedMessageV3.Builder<Trace.Builder> implements TraceOrBuilder
A trace describes how long it takes for an application to perform an
operation. It consists of a set of spans, each of which represent a single
timed event within the operation.
Protobuf type google.devtools.cloudtrace.v1.Trace
Static Methods
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
public Trace.Builder addAllSpans(Iterable<? extends TraceSpan> values)
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Parameter
Name | Description |
values | Iterable<? extends com.google.devtools.cloudtrace.v1.TraceSpan>
|
Returns
public Trace.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
public Trace.Builder addSpans(TraceSpan value)
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Parameter
Returns
public Trace.Builder addSpans(TraceSpan.Builder builderForValue)
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Parameter
Returns
public Trace.Builder addSpans(int index, TraceSpan value)
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Parameters
Returns
public Trace.Builder addSpans(int index, TraceSpan.Builder builderForValue)
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Parameters
Returns
public TraceSpan.Builder addSpansBuilder()
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Returns
public TraceSpan.Builder addSpansBuilder(int index)
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Parameter
Returns
Returns
public Trace buildPartial()
Returns
public Trace.Builder clear()
Returns
Overrides
public Trace.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
public Trace.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
public Trace.Builder clearProjectId()
Project ID of the Cloud project where the trace data is stored.
string project_id = 1;
Returns
public Trace.Builder clearSpans()
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Returns
public Trace.Builder clearTraceId()
Globally unique identifier for the trace. This identifier is a 128-bit
numeric value formatted as a 32-byte hex string. For example,
382d4f4c6b7bb2f4a972559d9085001d
.
string trace_id = 2;
Returns
public Trace.Builder clone()
Returns
Overrides
public Trace getDefaultInstanceForType()
Returns
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
public String getProjectId()
Project ID of the Cloud project where the trace data is stored.
string project_id = 1;
Returns
Type | Description |
String | The projectId.
|
public ByteString getProjectIdBytes()
Project ID of the Cloud project where the trace data is stored.
string project_id = 1;
Returns
public TraceSpan getSpans(int index)
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Parameter
Returns
public TraceSpan.Builder getSpansBuilder(int index)
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Parameter
Returns
public List<TraceSpan.Builder> getSpansBuilderList()
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Returns
public int getSpansCount()
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Returns
public List<TraceSpan> getSpansList()
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Returns
public TraceSpanOrBuilder getSpansOrBuilder(int index)
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Parameter
Returns
public List<? extends TraceSpanOrBuilder> getSpansOrBuilderList()
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Returns
Type | Description |
List<? extends com.google.devtools.cloudtrace.v1.TraceSpanOrBuilder> | |
public String getTraceId()
Globally unique identifier for the trace. This identifier is a 128-bit
numeric value formatted as a 32-byte hex string. For example,
382d4f4c6b7bb2f4a972559d9085001d
.
string trace_id = 2;
Returns
Type | Description |
String | The traceId.
|
public ByteString getTraceIdBytes()
Globally unique identifier for the trace. This identifier is a 128-bit
numeric value formatted as a 32-byte hex string. For example,
382d4f4c6b7bb2f4a972559d9085001d
.
string trace_id = 2;
Returns
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
public final boolean isInitialized()
Returns
Overrides
public Trace.Builder mergeFrom(Trace other)
Parameter
Name | Description |
other | Trace
|
Returns
public Trace.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
public Trace.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
public final Trace.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
public Trace.Builder removeSpans(int index)
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Parameter
Returns
public Trace.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
public Trace.Builder setProjectId(String value)
Project ID of the Cloud project where the trace data is stored.
string project_id = 1;
Parameter
Name | Description |
value | String
The projectId to set.
|
Returns
public Trace.Builder setProjectIdBytes(ByteString value)
Project ID of the Cloud project where the trace data is stored.
string project_id = 1;
Parameter
Name | Description |
value | ByteString
The bytes for projectId to set.
|
Returns
public Trace.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
public Trace.Builder setSpans(int index, TraceSpan value)
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Parameters
Returns
public Trace.Builder setSpans(int index, TraceSpan.Builder builderForValue)
Collection of spans in the trace.
repeated .google.devtools.cloudtrace.v1.TraceSpan spans = 3;
Parameters
Returns
public Trace.Builder setTraceId(String value)
Globally unique identifier for the trace. This identifier is a 128-bit
numeric value formatted as a 32-byte hex string. For example,
382d4f4c6b7bb2f4a972559d9085001d
.
string trace_id = 2;
Parameter
Name | Description |
value | String
The traceId to set.
|
Returns
public Trace.Builder setTraceIdBytes(ByteString value)
Globally unique identifier for the trace. This identifier is a 128-bit
numeric value formatted as a 32-byte hex string. For example,
382d4f4c6b7bb2f4a972559d9085001d
.
string trace_id = 2;
Parameter
Name | Description |
value | ByteString
The bytes for traceId to set.
|
Returns
public final Trace.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides