# PHP zero-code instrumentation

Site [llms.txt](/llms.txt)

---

OpenTelemetry provides two zero-code instrumentation approaches for PHP:

|              | [Auto-instrumentation](auto/)        | [PHP Distro](distro/)            |
| ------------ | ------------------------------------ | -------------------------------- |
| **Install**  | Composer + PECL extension            | OS package (`deb`, `rpm`, `apk`) |
| **Platform** | Linux, macOS, Windows                | Linux only                       |
| **Setup**    | Composer autoloading                 | Install package, restart PHP     |
| **Control**  | Full manual control                  | Opinionated defaults             |
| **Best for** | Flexible environments, custom config | Production Linux deployments     |

## Choose auto-instrumentation

Use [PHP zero-code auto-instrumentation](auto/) when you:

- Already use Composer
- Need to run on macOS or Windows
- Want maximum control over instrumentation and configuration

## Choose PHP Distro

Use [OpenTelemetry PHP Distro](distro/) when you:

- Deploy to Linux and want a package-managed install (`deb`, `rpm`, `apk`)
- Need zero-code onboarding without touching application code or Composer
- Want production-tuned defaults (background export, inferred spans, OpAMP)

---

Section pages:

- [PHP zero-code instrumentation](/docs/zero-code/php/auto/)
- [OpenTelemetry PHP Distro](/docs/zero-code/php/distro/): Production-ready, zero-code OpenTelemetry instrumentation for PHP, delivered as native Linux packages.
