Build a Lightweight Laravel Request Inspector | Mohamed Said        [  ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MH.png)   Mohamed Said Laravel Backend Engineer  ](https://www.msaied.com) [ Home ](https://www.msaied.com) [ Projects ](https://www.msaied.com/projects) [ Articles  ](https://www.msaied.com/articles) [ Certificates ](https://www.msaied.com/certificates) [ Contact ](https://www.msaied.com#contact-section) 

       [  ](https://github.com/EG-Mohamed)       

 [ Home ](https://www.msaied.com) [ Projects ](https://www.msaied.com/projects) [ Articles ](https://www.msaied.com/articles) [ Certificates ](https://www.msaied.com/certificates) [ Contact ](https://www.msaied.com#contact-section) 

  [ home ](https://www.msaied.com)    [ articles ](https://www.msaied.com/articles)    Laravel Telescope Alternatives: Building a Lightweight Request Inspector with Middleware        On this page       1. [  Why Not Just Use Telescope? ](#why-not-just-use-telescope)
2. [  Designing the Inspector ](#designing-the-inspector)
3. [  The Middleware ](#the-middleware)
4. [  The RequestStore ](#the-requeststore)
5. [  Filament Resource (Read-Only) ](#filament-resource-read-only)
6. [  Registering the Middleware ](#registering-the-middleware)
7. [  Key Takeaways ](#key-takeaways)

  ![Laravel Telescope Alternatives: Building a Lightweight Request Inspector with Middleware](https://cdn.msaied.com/216/9b6d240010b80483f072902dafcd216c.png)

  #laravel   #middleware   #debugging   #filament   #performance  

 Laravel Telescope Alternatives: Building a Lightweight Request Inspector with Middleware 
==========================================================================================

     16 Jun 2026      1 min read    ![Mohamed Said](https://cdn.msaied.com/01KT78WE565VEMM3PSNQAAB0MJ.jpg)  Mohamed Said  

       Table of contents

1. [  01   Why Not Just Use Telescope?  ](#why-not-just-use-telescope)
2. [  02   Designing the Inspector  ](#designing-the-inspector)
3. [  03   The Middleware  ](#the-middleware)
4. [  04   The RequestStore  ](#the-requeststore)
5. [  05   Filament Resource (Read-Only)  ](#filament-resource-read-only)
6. [  06   Registering the Middleware  ](#registering-the-middleware)
7. [  07   Key Takeaways  ](#key-takeaways)

 Why Not Just Use Telescope?
---------------------------

Laravel Telescope is excellent during local development, but its default `DatabaseWatcher` writes every request, query, and exception to your database synchronously. In production, that overhead compounds quickly — especially under load. Most teams either disable Telescope entirely or run it on a separate process with sampling, which adds operational complexity.

A focused, purpose-built inspector can give you 80% of the value at 10% of the cost. Here's how to build one.

---

Designing the Inspector
-----------------------

The goal: capture HTTP request metadata (method, URI, status, duration, authenticated user, peak memory) and persist it asynchronously to a Redis sorted set, with a Filament table to browse recent entries.

Three moving parts:

1. **`InspectRequest` middleware** — measures and serialises the request.
2. **`RequestStore`** — a thin abstraction over Redis.
3. **A Filament resource** — reads from Redis and renders the table.

---

The Middleware
--------------

```php
