Skip to content

Add Telescope-equivalent dev debug panel (requests / queries / jobs / mail / events) #166

@antosubash

Description

@antosubash

Background

There is no in-app developer dashboard that captures recent HTTP requests, EF Core queries, dispatched events, sent mails, background jobs, exceptions, etc. AuditLogs covers business actions, not framework-level traffic. Laravel Telescope is the canonical example.

Motivation

  • Local debugging without tailing logs or attaching a debugger
  • Catching N+1, slow queries, accidental email sends in dev
  • Drop-in for support engineers reproducing bugs in staging

Design sketch

New module modules/Telescope (dev-only by default; gated via Telescope:Enabled setting and Telescope.View permission):

Watchers (each implemented as a focused interceptor / event handler):

  • HttpRequestsWatcher — middleware records URL, status, duration, controller, payload (sampled, redacted)
  • EfQueriesWatcherDbCommandInterceptor records SQL, parameters (redacted), duration, stack trace
  • JobsWatcher — subscribes to BackgroundJobs lifecycle events
  • EventsWatcher — wraps IEventBus to record published events
  • MailWatcher — wraps Email module's sender
  • ExceptionsWatcherIExceptionHandler records unhandled exceptions
  • LogsWatcher — Serilog sink
  • CacheWatcherIDistributedCache decorator

Storage: dedicated SQLite file by default (telescope.db) with a 24-hour TTL purge job; opt-in to share the main DB.

UI: Inertia pages at /telescope listing each watcher's stream with detail-view drill-downs. Filter by tag (request-id, user-id, tenant-id).

Acceptance criteria

  • Module scaffolded; gated off in production by config
  • All listed watchers implemented (cache + log can be follow-ups)
  • PII redaction for payloads, query params, headers (configurable)
  • 24h auto-purge
  • Inertia UI with list + detail + filter
  • xUnit tests per watcher
  • Docs page with screenshot

References

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions