- How do I install daemon8/php in a Laravel project?
- Run `composer require daemon8ai/daemon8-php` in your project directory. The package has no Laravel-specific dependencies, so it integrates seamlessly with Laravel 9/10 (PHP 8.1+). For observability features, initialize it with `Daemon8::observe()` in your routes or service providers.
- Does daemon8/php work with Laravel queues or Horizon?
- Yes, but requires manual instrumentation. Use `Daemon8::job()` to wrap queue jobs or middleware to track queue processing. For Horizon, extend the `Daemon8ServiceProvider` to auto-instrument queue listeners. No built-in Horizon support exists yet.
- What Laravel versions and PHP versions are supported?
- daemon8/php supports Laravel 9 and 10 (PHP 8.1+) and is framework-agnostic. It avoids Laravel-specific dependencies, so it works in Symfony, Lumen, or custom PHP stacks. Always check the [GitHub repo](https://github.com/daemon8ai/daemon8-php) for the latest compatibility notes.
- Can I use daemon8/php for production observability without vendor lock-in?
- Yes, the package provides lightweight runtime diagnostics (e.g., memory, opcache stats) and integrates with Daemon8’s API for observability. Data is structured for compatibility with other APMs, and you can disable telemetry entirely with `Daemon8::disable()`. Review Daemon8’s privacy policy for compliance.
- How do I exclude sensitive data (PII) from telemetry?
- Use Daemon8’s built-in filters to redact PII before sending data. Configure this via `Daemon8::configure(['filters' => [/* your rules */]])`. For Laravel, extend the package with middleware to scrub request/response data before instrumentation. Always validate against GDPR/SOC 2 requirements.
- What’s the performance overhead of daemon8/php in high-traffic Laravel apps?
- Minimal—setup requires <10 lines of code, and telemetry can be sampled or disabled in staging. Profile with `Daemon8::disable()` to measure impact. For high-throughput endpoints, use selective instrumentation (e.g., only critical paths) and monitor latency in staging.
- Are there alternatives to daemon8/php for Laravel observability?
- Yes. For Laravel-specific tools, consider **Laravel Telescope** (debugging) or **Blackfire** (profiling). For open-source APMs, **OpenTelemetry PHP** is a strong alternative. Daemon8/php stands out for its **PHP-specific insights** (e.g., opcache, memory leaks) and **AI-driven anomaly detection** in a unified ecosystem.
- How do I integrate daemon8/php with Laravel’s service container?
- Manually bind the Daemon8 facade or services using Laravel’s `bind()` method in a service provider. Example: `app()->bind('daemon8', fn() => new Daemon8());`. For auto-registration, extend `Daemon8ServiceProvider` and publish it via `php artisan vendor:publish`.
- Does daemon8/php support CLI or cron job instrumentation?
- Not out of the box—manual instrumentation is required for CLI/cron tasks. Use traits or decorate your commands with `Daemon8::observe()` for telemetry. For Laravel, wrap `Artisan::command()` calls in middleware or service providers to enable observability.
- How do I test daemon8/php in a Laravel project without hitting Daemon8’s API?
- Use offline mode with `Daemon8::configure(['offline' => true])` to mock telemetry. For unit tests, stub the `Daemon8` facade or use PHPUnit’s `setMock()` to intercept calls. Test edge cases like disabled telemetry or error scenarios in isolation.