Skip to content
AXVI BUILD · WRITE · SHIP
Packages

Wiretap for Laravel

The Laravel collector for Wiretap: sends requests, queries, jobs, mail, exceptions and 13 more event types to your self-hosted Wiretap server, with no code changes.

Wiretap for Laravel

This package is the Laravel half of Wiretap, a self-hosted application inspector and monitoring tool. The package listens to what your app does and sends it to the Wiretap server, where you see it as trace trees, mail, performance reports and alerts.

Requirements

  • PHP 8.2+
  • Laravel 12 or 13
  • A running Wiretap server: docker run -d -p 8080:8080 -p 9090:9090 -p 1025:1025 -v wiretap_data:/data ghcr.io/axvilab/wiretap

Installation

composer require axvi/wiretap-laravel

The service provider is auto-discovered. Switch it on in .env:

WIRETAP_ENABLED=true
WIRETAP_URL=http://localhost:9090/ingest

Open the Wiretap UI at http://localhost:8080 and make a request to your app.

What it collects

Requests, queries, exceptions, jobs, mail, cache, notifications, outgoing HTTP calls, auth events, Artisan commands, scheduled tasks, gate checks, dump() calls, validation errors, transactions, broadcasts, model events and views. Every type has its own switch, ignore list and data filter, and sensitive fields such as passwords are masked before anything leaves the app. Events are gzip-compressed and sent with a short timeout so a missing server never slows your app down.

The wiretap() helper

Like dump(), but prints nothing: the value shows up only in the Wiretap trace.

wiretap($user);
wiretap($order->total, 'order total');

// Returns the value, so it works inside expressions and chains
return wiretap($query->get(), 'query results')->map(...);

Drivers

  • HTTP (default): posts events to the Wiretap ingest endpoint.
  • Redis: pushes events to a Redis list that the Wiretap server reads. Needs ext-redis or predis/predis.
WIRETAP_DRIVER=redis
WIRETAP_REDIS_CONNECTION=default
WIRETAP_REDIS_QUEUE=wiretap:events

The full configuration reference is in the README on GitHub.

Esc