Reference documentation and code samples for the Stackdriver Trace Client class Link.
This plain PHP class represents a Link resource. A pointer from the current span to another span in the same trace or in a different trace. For example, this can be used in batching operations, where a single batch handler processes multiple requests from different traces or when the handler receives a request from a different project.
Example:
use Google\Cloud\Trace\Link;
$link = new Link('abcd1234', 'abcd2345');
$span->addLink($link);
Namespace
Google \ Cloud \ TraceMethods
__construct
Create a new Link.
traceId
string
spanId
string
options
array
Configuration options.
↳ type
string
The relationship of the current span relative to the linked span. Defaults to TYPE_UNSPECIFIED
.
↳ uncompressedSizeBytes
int
The number of uncompressed bytes sent or received.
↳ compressedSizeBytes
int
The number of compressed bytes sent or received. If missing assumed to be the same size as uncompressed.
info
Returns a serializable array representing this Link.
array
Constants
TYPE_UNSPECIFIED
Value: \Google\Cloud\Trace\V2\Span\Link\Type::TYPE_UNSPECIFIED
TYPE_CHILD_LINKED_SPAN
Value: \Google\Cloud\Trace\V2\Span\Link\Type::CHILD_LINKED_SPAN
TYPE_PARENT_LINKED_SPAN
Value: \Google\Cloud\Trace\V2\Span\Link\Type::PARENT_LINKED_SPAN