span

package
v0.3.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package span exposes telemetry spans to PHP as the start_span() binding, so 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, which is what a CLI run without telemetry looks like, start_span returns a span whose methods do nothing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(rt *runner.Runtime)

Register installs symbols into the runtime.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL