PHPackages                             akhtar/laravel-debug-tracer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. akhtar/laravel-debug-tracer

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

akhtar/laravel-debug-tracer
===========================

On-demand, token-scoped, file-based debug tracing for Laravel. Zero setup, zero migrations, zero Redis.

v1.0.0(1mo ago)00MITBladePHP ^8.1

Since Apr 22Pushed 1mo agoCompare

[ Source](https://github.com/Akhtar13/laravel-debug-tracer)[ Packagist](https://packagist.org/packages/akhtar/laravel-debug-tracer)[ RSS](/packages/akhtar-laravel-debug-tracer/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependencies (7)Versions (7)Used By (0)

Laravel Debug Session Tracer
============================

[](#laravel-debug-session-tracer)

Minimal, file-based API lifecycle tracing for Laravel.

This package is now focused only on tracing API request/response/error lifecycle events. No Trace ID filtering, no admin/debug extras, and no job debugging.

Install
-------

[](#install)

```
composer require akhtar/laravel-debug-tracer
```

Publish configuration
---------------------

[](#publish-configuration)

```
php artisan vendor:publish --tag=debug-tracer-config
```

Required configuration
----------------------

[](#required-configuration)

Set these in `.env`:

```
DEBUG_TRACER_ENABLED=true
DEBUG_TRACER_TTL_MINUTES=30
DEBUG_TRACER_MATCHING_HEADER=X-Debug-Token
```

Config (`config/debug-tracer.php`) options used in this minimal mode:

- `enabled`
- `session_ttl_minutes`
- `storage_path`
- `matching_header`
- `route_middleware`
- `register_routes`
- `attach_api_middleware`

Scheduler setup (recommended)
-----------------------------

[](#scheduler-setup-recommended)

The package provides `debug-tracer:cleanup` and auto-schedules it every 5 minutes.

Make sure your app scheduler is running in your environment:

```
php artisan schedule:work
```

Routes
------

[](#routes)

- `POST /debug/start`
- `POST /debug/stop`
- `GET /debug/export/{session_id}`
- `GET /debug-dashboard`
- `GET /debug-dashboard/logs/{session_id}`

Lifecycle behavior
------------------

[](#lifecycle-behavior)

### Start session

[](#start-session)

`POST /debug/start`

Body:

```
{
  "token": "Bearer 3011|your-api-token"
}
```

What happens:

1. All old session files in storage are removed.
2. A new active session is created.
3. New API lifecycle events are appended to this session file.

### Stop session

[](#stop-session)

`POST /debug/stop`

Body:

```
{
  "session_id": "uuid"
}
```

Header:

```
X-Debug-Token: your-api-token
```

What happens:

1. Session ownership is validated by token.
2. Session meta/log files are deleted immediately.
3. Export is no longer possible for that stopped session.

### Export logs

[](#export-logs)

`GET /debug/export/{session_id}?token=Bearer your-api-token`

Returns NDJSON of captured API lifecycle entries.

Dashboard behavior
------------------

[](#dashboard-behavior)

In `/debug-dashboard`:

- Start button is disabled while a session is active.
- Stop and Export are disabled until a session is active.
- After stop, Stop and Export are disabled again.
- The UI only shows API request/response/error lifecycle details.

Storage
-------

[](#storage)

Default path:

- `storage/debug-traces/{session_id}.meta.json`
- `storage/debug-traces/{session_id}.log`

On new session start, all old files are deleted first. On stop, current session files are deleted immediately.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 62.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

47d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/85cefa6a8f77f7040e1b7df01308efce21e57a1fce39e0b0cf70f5b3e0eb55b3?d=identicon)[akhtar-13](/maintainers/akhtar-13)

---

Top Contributors

[![Akhtar13](https://avatars.githubusercontent.com/u/103118756?v=4)](https://github.com/Akhtar13 "Akhtar13 (15 commits)")[![backedhi5host](https://avatars.githubusercontent.com/u/67960666?v=4)](https://github.com/backedhi5host "backedhi5host (9 commits)")

---

Tags

laravelloggingdebugtracingqueue

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/akhtar-laravel-debug-tracer/health.svg)

```
[![Health](https://phpackages.com/badges/akhtar-laravel-debug-tracer/health.svg)](https://phpackages.com/packages/akhtar-laravel-debug-tracer)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3325.1M337](/packages/psalm-plugin-laravel)[api-platform/laravel

API Platform support for Laravel

59156.3k10](/packages/api-platform-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
