TraceSpan
class TraceSpan extends Message
A span represents a single timed event within a trace. Spans can be nested and form a trace tree. Often, a trace contains a root span that describes the end-to-end latency of an operation and, optionally, one or more subspans for its suboperations. Spans do not need to be contiguous. There may be gaps between spans in a trace.
Protobuf type Google\Devtools\Cloudtrace\V1\TraceSpan
Methods
No description
Identifier for the span. Must be a 64-bit integer other than 0 and unique within a trace.
Identifier for the span. Must be a 64-bit integer other than 0 and unique within a trace.
Distinguishes between spans generated in a particular context. For example,
two spans with the same name may be distinguished using RPC_CLIENT
and RPC_SERVER
to identify queueing latency associated with the span.
Distinguishes between spans generated in a particular context. For example,
two spans with the same name may be distinguished using RPC_CLIENT
and RPC_SERVER
to identify queueing latency associated with the span.
Name of the trace. The trace name is sanitized and displayed in the Stackdriver Trace tool in the Google Developers Console.
Name of the trace. The trace name is sanitized and displayed in the Stackdriver Trace tool in the Google Developers Console.
Start time of the span in nanoseconds from the UNIX epoch.
End time of the span in nanoseconds from the UNIX epoch.
ID of the parent span, if any. Optional.
ID of the parent span, if any. Optional.
Collection of labels associated with the span.
Collection of labels associated with the span.
Details
at line 73
__construct()
at line 85
int|string
getSpanId()
Identifier for the span. Must be a 64-bit integer other than 0 and unique within a trace.
Generated from protobuf field fixed64 span_id = 1;
at line 97
setSpanId(int|string $var)
Identifier for the span. Must be a 64-bit integer other than 0 and unique within a trace.
Generated from protobuf field fixed64 span_id = 1;
at line 111
int
getKind()
Distinguishes between spans generated in a particular context. For example,
two spans with the same name may be distinguished using RPC_CLIENT
and RPC_SERVER
to identify queueing latency associated with the span.
Generated from protobuf field .google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2;
at line 124
setKind(int $var)
Distinguishes between spans generated in a particular context. For example,
two spans with the same name may be distinguished using RPC_CLIENT
and RPC_SERVER
to identify queueing latency associated with the span.
Generated from protobuf field .google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2;
at line 141
string
getName()
Name of the trace. The trace name is sanitized and displayed in the Stackdriver Trace tool in the Google Developers Console.
The name may be a method name or some other per-call site name. For the same executable and the same call point, a best practice is to use a consistent name, which makes it easier to correlate cross-trace spans.
Generated from protobuf field string name = 3;
at line 157
setName(string $var)
Name of the trace. The trace name is sanitized and displayed in the Stackdriver Trace tool in the Google Developers Console.
The name may be a method name or some other per-call site name. For the same executable and the same call point, a best practice is to use a consistent name, which makes it easier to correlate cross-trace spans.
Generated from protobuf field string name = 3;
at line 169
Timestamp
getStartTime()
Start time of the span in nanoseconds from the UNIX epoch.
Generated from protobuf field .google.protobuf.Timestamp start_time = 4;
at line 180
setStartTime(Timestamp $var)
Start time of the span in nanoseconds from the UNIX epoch.
Generated from protobuf field .google.protobuf.Timestamp start_time = 4;
at line 192
Timestamp
getEndTime()
End time of the span in nanoseconds from the UNIX epoch.
Generated from protobuf field .google.protobuf.Timestamp end_time = 5;
at line 203
setEndTime(Timestamp $var)
End time of the span in nanoseconds from the UNIX epoch.
Generated from protobuf field .google.protobuf.Timestamp end_time = 5;
at line 215
int|string
getParentSpanId()
ID of the parent span, if any. Optional.
Generated from protobuf field fixed64 parent_span_id = 6;
at line 226
setParentSpanId(int|string $var)
ID of the parent span, if any. Optional.
Generated from protobuf field fixed64 parent_span_id = 6;
at line 238
RepeatedField
getLabels()
Collection of labels associated with the span.
Generated from protobuf field map<string, string> labels = 7;
at line 249
setLabels(array|RepeatedField $var)
Collection of labels associated with the span.
Generated from protobuf field map<string, string> labels = 7;