Namespace
Runtime\PS\Span
Package span exposes telemetry spans to PHP as the start_span() binding and a script can measure a region of its own work next to the spans the interpreter...
Description
Package span exposes telemetry spans to PHP as the start_span() binding and a script can measure a region of its own work next to the spans the interpreter records for it.
The span is the telemetry span, not a copy of it: methods on the returned value are the Go methods spelled the way PHP spells them.
$span = start_span("getUser", "database");
$span->set_attribute("user_id", 42);
$span->end();Without a trace in the context, as a CLI run without telemetry has it, start_span returns a span whose methods do nothing.
- Package
stdlib/ps/spangodoc
Functions
A call writes the bare name or the name under this area:
\Runtime\PS\Span\start_span().