SpanLink
Read onlyYes
FinalYes
Tags
Properties
Methods
- __construct() : mixed
- create() : self
- Create a SpanLink with the given context and optional attributes.
- fromArray() : self
- Create a SpanLink from a normalized array representation.
-
normalize()
: array{context: array{traceId: array{hex: string}, spanId: array{hex: string}, parentSpanId: null|array{hex: string}, isRemote: bool, traceFlags: array{byte: int}, traceState: array{entries: array
}}, attributes: array , droppedAttributeCount: int} - Normalize the SpanLink to an array representation for serialization.
Properties
$attributes
public
Attributes
$attributes
= new Attributes()
$context
public
SpanContext
$context
$droppedAttributeCount
public
int
$droppedAttributeCount
= 0
Methods
__construct()
public
__construct(SpanContext $context[, Attributes $attributes = new Attributes() ][, int $droppedAttributeCount = 0 ]) : mixed
Parameters
- $context : SpanContext
- $attributes : Attributes = new Attributes()
- $droppedAttributeCount : int = 0
create()
Create a SpanLink with the given context and optional attributes.
public
static create(SpanContext $context[, Attributes|TAttributeValueMap $attributes = [] ][, int $droppedAttributeCount = 0 ]) : self
Parameters
- $context : SpanContext
-
The linked span's context
- $attributes : Attributes|TAttributeValueMap = []
-
Link attributes
- $droppedAttributeCount : int = 0
-
Number of attributes dropped due to limits
Return values
selffromArray()
Create a SpanLink from a normalized array representation.
public
static fromArray(array{context: array{traceId: array{hex: string}, spanId: array{hex: string}, parentSpanId: null|array{hex: string}, isRemote: bool, traceFlags?: array{byte: int}, traceState?: array{entries: array}}, attributes: array, droppedAttributeCount?: int} $data) : self
Parameters
-
$data
: array{context: array{traceId: array{hex: string}, spanId: array{hex: string}, parentSpanId: null|array{hex: string}, isRemote: bool, traceFlags?: array{byte: int}, traceState?: array{entries: array
}}, attributes: array , droppedAttributeCount?: int} -
Normalized SpanLink data
Return values
selfnormalize()
Normalize the SpanLink to an array representation for serialization.
public
normalize() : array{context: array{traceId: array{hex: string}, spanId: array{hex: string}, parentSpanId: null|array{hex: string}, isRemote: bool, traceFlags: array{byte: int}, traceState: array{entries: array}}, attributes: array, droppedAttributeCount: int}