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.
  1. Initialize SDK in application bootstrap/service provider.
  2. Instrument HTTP request lifecycle.
  3. Capture exceptions from global handler.
  4. Instrument queue jobs and external APIs.

Minimum Data Contract

  • Consistent service, env, version tags.
  • 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

  1. Keep credentials in deployment secret stores.
  2. Use queue-safe buffering settings.
  3. 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.

On this page