--enable-appsec).symfony/http-foundation). Assumes Laravel’s session/auth systems are compatible with Symfony’s RequestStack and Security components.compass_datadog.yaml. APM data flows automatically via the agent.--enable-appsec flag.Auth events to ASM-compatible formats).RequestStack (likely works out-of-the-box).| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Agent Configuration | High | Validate agent version (>=7.30.0 for ASM) and environment-specific flags (e.g., disable in test). |
| ASM Event Mapping | Medium | Test login events in staging; extend bundle config for custom fields. |
| Performance Overhead | Low | APM/ASM adds minimal overhead (~1–5ms per trace/event). Monitor with DataDog’s RUM. |
| Laravel Auth Edge Cases | Medium | Handle non-Symfony auth (e.g., Laravel Sanctum) via bundle extensions. |
symfony/http-foundation, symfony/security).--enable-appsec and AppSec configuration.ddtrace directly (more control but higher maintenance).spatie/laravel-datadog (older, less maintained).Phase 1: APM Only (Low Risk)
bundles.php, configure compass_datadog.yaml.Phase 2: ASM (Medium Risk)
--enable-appsec.appsec: { enabled: true, custom_fields: { user_type: "admin" } }).Phase 3: Customization
Illuminate\Auth\Events\Attempting and inject payloads.RequestStack; Laravel’s session should auto-integrate.Security component. For Laravel, wrap Auth::user() in a Symfony User object or extend the bundle.Authenticate middleware).dd-trace-php with enable_appsec: true).composer require compasshp/datadog-bundle.config/bundles.php.compass_datadog.yaml (disable in test).compasshp/datadog-bundle for updates (MIT license; low maintenance risk).compass_datadog.yaml in a config management tool (e.g., Ansible, Laravel Envoy)./var/log/datadog/agent.log) and DataDog’s PHP APM docs.ddtrace_php CLI tools to inspect traces: dd-trace run php artisan tinker.compass_datadog: { appsec: { debug: true } }.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Agent Down | No APM/ASM data | Alert on agent health (e.g., dd-agent process monitoring). |
| Bundle Misconfiguration | Incorrect user/session data | Validate config in staging. |
| ASM Event Throttling | Dropped login events | Monitor DataDog’s ASM limits. |
| Laravel Auth System Incompatible | Missing user context in traces | Extend bundle or use middleware hooks. |
| DataDog API Rate Limits | APM/ASM data loss | Implement retries for API calls. |
How can I help you explore Laravel packages today?