Telescope Inspect

Query Laravel Telescope data from the command line. It prints readable summaries for people and JSON for scripts, CI jobs, and other tools.

Query Laravel Telescope data from the command line. It prints readable summaries for people and JSON for scripts, CI jobs, and other tools.

Telescope records a lot. Answering questions like "which routes were slow this hour" or "what keeps failing on the queue" usually means clicking through the dashboard or writing SQL against telescope_entries. This package gives you a command for it:

php artisan telescope:inspect --requests --last=1h
Requests · showing 50 of 184 · last 1h
--------------------------------------

 Avg 1.12s · P95 3.80s · Statuses: 200×171   500×9   302×4

 Method  URI                       Reqs   Avg     P95     Avg queries
 GET     /orders                   42     842ms   1.70s   38
 POST    /checkout                 17     1.94s   3.80s   61

What it does

  • Lists any of the 18 Telescope entry types with filters (time window, duration, route, status, connection, free text search).
  • Summarizes requests, queries, exceptions, and jobs: slow routes with P95 durations, repeated SQL patterns, likely N+1 detection, exception signatures, failing jobs.
  • Replays one request or job end to end with --batch=<id>, in recording order.
  • Watches live traffic with --watch and prints new entries as they arrive.
  • Manages monitored tags with telescope:monitor (list, add, remove).
  • Emits a versioned JSON envelope with --json, or one JSON object per line with --ndjson.
  • Detects AI coding agents (Claude Code, Cursor, OpenCode, ...) and returns JSON to them automatically; humans keep tables.
  • Exits non-zero on demand via --fail-on for CI pipelines.
  • Redacts fields that tend to contain sensitive values unless you ask for them.

It pairs with the commands Telescope already ships (telescope:clear, telescope:prune, telescope:pause, telescope:resume) instead of duplicating them.

Everything runs locally against Telescope's own storage tables. The package makes no network requests.

Requirements

Package Version
PHP ^8.3
Laravel 11 / 12 / 13
Laravel Telescope ^5.0

A look at the JSON

php artisan telescope:inspect --requests --queries --exceptions --jobs --last=1h --json
{
    "schema_version": "1.0",
    "command": "telescope:inspect",
    "generated_at": "2026-08-22T12:00:00.000000Z",
    "filters": { "types": ["request", "query"], "last": "1h" },
    "summary": {
        "total_entries_in_window": 184,
        "entries_by_type": { "request": 42 },
        "analysis": {
            "request": {
                "avg_duration_ms": 1120.5,
                "p95_duration_ms": 3800,
                "routes": [{ "uri": "/orders", "requests": 42 }]
            }
        }
    },
    "violations": [],
    "items": [{ "uuid": "...", "type": "request", "duration_ms": 842 }]
}

The full contract is documented in json-output.md.

Next steps