SpanData
class SpanData (View source)
Properties
| string|null | $name | The span name |
|
| string|null | $resource | The resource you are tracing |
|
| 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 |
|
| 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 |
|
| 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 |
|
| string[] | $meta_struct | ||
| string|null | $type | The type of request which can be set to: web, db, cache, or custom (Optional). Inherited from parent. |
|
| string[] | $meta | ||
| float[] | $metrics | ||
| Throwable|null | $exception | An exception generated during the execution of the original function, if any. |
|
| string | $id | The unique identifier of the span |
|
| SpanLink[] | $links | ||
| string[] | $peerServiceSources | ||
| SpanData|null | $parent | The parent span, or 'null' if there is none |
|
| SpanStack | $stack | The span's stack trace |
Methods
Get the current span duration, in nanoseconds
Get the start time of the span, in nanoseconds
Returns the span id as zero-padded 16 character hexadecimal string.
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.