Skip to content

Implement Observability Best Practices #123

Description

@fbenmadani

Implement a comprehensive observability stack for the sfSaas multi-tenant application to ensure reliability, performance, and easy debugging.

Tasks

  • Context-Aware Logging: Inject tenant_id into all logs via Log::shareContext() in TenancyServiceProvider.
  • Real-Time Monitoring: Install and configure Laravel Pulse.
    • Configure custom cards for tenant-specific metrics.
  • Health Checks: Install Spatie Laravel Health.
    • Add checks for Database, Redis, Disk, and Tenant Database connectivity.
  • Exception Tracking: Integrate Sentry or Flare with tenant tagging.
  • Audit Trails: Implement tenant-scoped activity logging using spatie/laravel-activitylog.
  • Telescope Integration: Enable TelescopeTags in config/tenancy.php for better tenant-level debugging.

Benefits

  • Faster MTTR (Mean Time To Resolution) for customer issues.
  • Proactive identification of "noisy neighbor" tenants.
  • Improved security and compliance via audit logs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions