SpanData
class SpanData
This plain PHP class represents a read-only version of 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.
Methods
Instantiate a new SpanData instance.
Retrieve the start time for this span.
Retrieve the end time for this span.
Retrieve the ID of this span's trace.
Retrieve the ID of this span.
Retrieve the ID of this span's parent if it exists.
Retrieve the name of this span.
Return the attributes for this span.
Return the time events for this span.
Retrieve the stackTrace at the moment this span was created
Return a hash id for this span's stackTrace in hexadecimal
Whether or not this span is in the same process as its parent.
Returns the span kind.
Details
at line 169
__construct(string $name, string $traceId, string $spanId, DateTimeInterface $startTime = null, DateTimeInterface $endTime = null, array $options = [])
Instantiate a new SpanData instance.
at line 209
DateTimeInterface
startTime()
Retrieve the start time for this span.
at line 219
DateTimeInterface
endTime()
Retrieve the end time for this span.
at line 229
string
traceId()
Retrieve the ID of this span's trace.
at line 239
string
spanId()
Retrieve the ID of this span.
at line 249
string
parentSpanId()
Retrieve the ID of this span's parent if it exists.
at line 259
string
name()
Retrieve the name of this span.
at line 269
array
attributes()
Return the attributes for this span.
at line 279
TimeEvent[]
timeEvents()
Return the time events for this span.
at line 289
Link[]
links()
Return the links for this span.
at line 299
Status
status()
Retrieve the final status for this span.
at line 309
array
stackTrace()
Retrieve the stackTrace at the moment this span was created
at line 319
string
stackTraceHashId()
Return a hash id for this span's stackTrace in hexadecimal
at line 334
bool
sameProcessAsParentSpan()
Whether or not this span is in the same process as its parent.
at line 344
string
kind()
Returns the span kind.