Laravel Project Guide
Complete observability setup for Laravel web backends
Use this guide for Laravel services that need stable incident context across request lifecycle and queue jobs.
Architecture Scope
- HTTP kernel and middleware stack.
- Controllers/services/repositories.
- Queue workers and scheduled jobs.
Recommended Setup
- Initialize SDK in application bootstrap/service provider.
- Instrument HTTP request lifecycle.
- Capture exceptions from global handler.
- Instrument queue jobs and external APIs.
Minimum Data Contract
- Consistent
service,env,versiontags. - Correlation ID between request and queued work.
- Error context with route and exception class.
Validation Checklist
- Web requests emit logs/traces.
- Queue jobs emit telemetry with same environment tags.
- Failed jobs include enough context for triage.
Production Hardening
- Keep credentials in deployment secret stores.
- Use queue-safe buffering settings.
- Validate observability after framework upgrades.
Troubleshooting
- Web data present but queue data missing: initialize SDK in worker context.
- Noisy logs: restrict low-value events.
- Correlation breaks: enforce shared request/job identifiers.