PHP zero-code instrumentation¶
Beacon PHP 1.3.0 supports PHP 8.2, 8.3 and 8.4. The default standalone installer selects Beacon native extension 1.0.1 and installs an isolated Agent runtime. It requires no Composer and preserves application dependencies. Linux glibc x86_64 has passed standalone acceptance; see the release-specific deployment guide for platform constraints.
Before starting, enable the DataKit OpenTelemetry input as described in Common configuration. The commands use a Linux/macOS shell and assume that the application and DataKit run on the same host. Replace 127.0.0.1 and adjust the listening address for remote or container deployments.
Install¶
curl --fail --location --output beacon-setup.php \
https://github.com/beacon-observability/beacon-php/releases/download/v1.3.0/beacon-setup.php
php beacon-setup.php --php-bin=all \
--service-name=my-php-service \
--otlp-endpoint=http://127.0.0.1:9529/otel
Run with permission to write PHP's extension/INI directories and the installation directory, which defaults to /opt/beacon/php on Unix. --dry-run previews changes. The release includes SHA256SUMS for independent installer verification; the installer verifies its downloaded runtime and native archives.
The runtime loads before application code and includes selected official PDO, cURL, Guzzle, Laravel and Symfony instrumentation. Existing auto_prepend_file behavior is preserved. Applications that need manual spans to share the Agent's SDK/context can use the advanced Composer project mode.
Run and manage¶
Restart PHP-FPM or Apache after installation, then generate application traffic. CLI applications keep their normal launch command:
Service and endpoint defaults are recorded by the installer and work with PHP-FPM clear_env=yes. Application OTEL_* environment settings override defaults; PHP-FPM must pass those overrides to its workers through pool configuration.
Before upgrading, download the installer from the target release, then upgrade and restart the PHP service:
To uninstall, restore the original startup configuration with the following command, then restart the PHP service:
Security and runtime SBOM are experimental and opt-in. Beacon PHP does not currently ship a profiling component.
Debugging and diagnostics¶
php beacon-setup.php doctor --php-bin=all > beacon-php-doctor.txt
OTEL_LOG_LEVEL=debug OTEL_PHP_LOG_DESTINATION=stderr \
php public/index.php 2> beacon-php-debug.log
doctor checks managed startup configuration, the Beacon extension and actual standalone bootstrap for CLI targets. It does not acknowledge OTLP delivery. Verify an actual request for each FPM pool: CLI and FPM may use different INI files, environment variables and pool overrides.
For PHP-FPM, pass the debug variables to actual workers and collect standard error through FPM logging. Remove debug overrides and restart workers after troubleshooting.
Verify the installation¶
Send a request through a supported framework or library, then open APM > Traces in TrueWatch and filter by the configured service name. See Common configuration for verification steps and Troubleshooting if no data appears.