RootSpanData
class RootSpanData extends SpanData (View source)
Properties
| string|null | $name | The span name |
from SpanData |
| string|null | $resource | The resource you are tracing |
from SpanData |
| string|null | $service | The service you are tracing. Defaults to active service at the time of span creation (i.e., the parent span), or datadog.service initialization settings if no parent exists |
from SpanData |
| string | $env | The environment you are tracing. Defaults to active environment at the time of span creation (i.e., the parent span), or datadog.env initialization settings if no parent exists |
from SpanData |
| string | $version | The version of the application you are tracing. Defaults to active version at the time of span creation (i.e., the parent span), or datadog.version initialization settings if no parent exists |
from SpanData |
| string[] | $meta_struct | from SpanData | |
| string|null | $type | The type of request which can be set to: web, db, cache, or custom (Optional). Inherited from parent. |
from SpanData |
| string[] | $meta | from SpanData | |
| float[] | $metrics | from SpanData | |
| Throwable|null | $exception | An exception generated during the execution of the original function, if any. |
from SpanData |
| string | $id | The unique identifier of the span |
from SpanData |
| SpanLink[] | $links | from SpanData | |
| string[] | $peerServiceSources | from SpanData | |
| SpanData|null | $parent | The parent span, or 'null' if there is none |
from SpanData |
| SpanStack | $stack | The span's stack trace |
from SpanData |
| string | $origin | The origin site of the trace. Propagated through distributed tracing by default. |
|
| array | $propagatedTags | A hashset of keys which are propagated from meta, if present. |
|
| int | $samplingPriority | The currently active sampling priority. |
|
| int | $propagatedSamplingPriority | The unmodified sampling priority as inherited directly through distributed tracing. |
|
| string | $tracestate | The original tracestate minus datadog specific tags, as it will be propagated to upstream distributed tracing targets. |
|
| array | $tracestateTags | A list of datadog specific tags, which will be propagated to upstream distributed tracing targets as part of the tracestate. Some known keys are not included here, but directly extracted, e.g. origin. |
|
| string | $parentId | The unique identifier of the parent span as a decimal number. |
|
| string | $traceId | The unique identifier for the trace id, as a zero-padded 32 character hexadecimal string. |
Methods
Details
int
getDuration()
Get the current span duration, in nanoseconds
int
getStartTime()
Get the start time of the span, in nanoseconds
SpanLink
getLink()
Get a pre-populated SpanLink object with the current span's trace and span IDs
string
hexId()
Returns the span id as zero-padded 16 character hexadecimal string.