class Link

A class that represents a Link resource.

Traits

Constants

TYPE_UNSPECIFIED

TYPE_CHILD_LINKED_SPAN

TYPE_PARENT_LINKED_SPAN

Methods

addAttributes(array $attributes)

Attach attributes to this object.

addAttribute(string $attribute, mixed $value)

Attach a single attribute to this object.

array
attributes()

Return the list of attributes for this object.

__construct(string $traceId, string $spanId, array $options = [])

Create a new Link.

string
traceId()

Return the traceId for this link.

string
spanId()

Return the spanId for this link.

string
type()

Return the type for this link.

Details

in AttributeTrait at line 32
addAttributes(array $attributes)

Attach attributes to this object.

Parameters

array $attributes Attributes in the form of $attribute => $value

in AttributeTrait at line 45
addAttribute(string $attribute, mixed $value)

Attach a single attribute to this object.

Parameters

string $attribute The name of the attribute.
mixed $value The value of the attribute. Will be cast to a string

in AttributeTrait at line 55
array attributes()

Return the list of attributes for this object.

Return Value

array

at line 60
__construct(string $traceId, string $spanId, array $options = [])

Create a new Link.

Parameters

string $traceId TRACE_ID a unique identifier for a trace.
string $spanId SPAN_ID a unique identifier for a span within a trace.
array $options [description] Configuration options

 @type string $type The relationship of the current span relative to
       the linked span: child, parent, or unspecified.
 @type array $attributes Attributes for this annotation.
 @type \DateTimeInterface|int|float $time The time of this event.

at line 77
string traceId()

Return the traceId for this link.

Return Value

string

at line 87
string spanId()

Return the spanId for this link.

Return Value

string

at line 97
string type()

Return the type for this link.

Return Value

string