PHPackages                             engvanntha/request-trace - 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. engvanntha/request-trace

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

engvanntha/request-trace
========================

Request-aware class/function/variable logging for Laravel applications.

v1.0.0(2mo ago)01MITPHPPHP &gt;=7.1.3

Since Feb 27Pushed 2mo agoCompare

[ Source](https://github.com/engvanntha/request-trace)[ Packagist](https://packagist.org/packages/engvanntha/request-trace)[ RSS](/packages/engvanntha-request-trace/feed)WikiDiscussions development Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

engvanntha/request-trace
========================

[](#engvanntharequest-trace)

Reusable request-aware logging package for Laravel 5.8 through 12.

Installation
------------

[](#installation)

```
composer require engvanntha/request-trace
```

Features
--------

[](#features)

- Captures `X-Request-Id` from incoming HTTP requests (falls back to generated UUID).
- Auto logs all client requests/responses with `Class@method` (no per-function calls).
- Provides `RequestTraceTrait` for class/function/variable-aware logs.
- Supports variable selection and sensitive-field masking.
- Works in controllers, services, middleware, and other classes.

Trait usage
-----------

[](#trait-usage)

```
use Engvanntha\RequestTrace\Traits\RequestTraceTrait;

class ClassName
{
    use RequestTraceTrait;

    public function functionName(array $data)
    {
        $user = $this->queryUser($data);

        // Log one variable
        $this->traceLog('user', $user);

        // Log selected variables only
        $this->traceLogVars(compact('data', 'user'), array('user'));

        return $user;
    }
}
```

Generated message format:

```
@@@@

```

Middleware
----------

[](#middleware)

Register middleware:

```
\Engvanntha\RequestTrace\Middleware\CaptureRequestTrace::class
```

This middleware should run early in the HTTP stack.

With `auto_log_requests=true`, each request is logged automatically in format:

```
@@@@

```

Use `RequestTraceTrait` only for additional deep logs inside selected services/functions.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance85

Actively maintained with recent releases

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity29

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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

78d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b565b4fa4eb4aa1a71af511cda41516cb61de7673f6567514f5f9676cbe15d9?d=identicon)[engvanntha](/maintainers/engvanntha)

---

Top Contributors

[![engvanntha](https://avatars.githubusercontent.com/u/74441847?v=4)](https://github.com/engvanntha "engvanntha (4 commits)")

### Embed Badge

![Health badge](/badges/engvanntha-request-trace/health.svg)

```
[![Health](https://phpackages.com/badges/engvanntha-request-trace/health.svg)](https://phpackages.com/packages/engvanntha-request-trace)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[beyondcode/laravel-server-timing

Add Server-Timing header information from within your Laravel apps.

5712.0M1](/packages/beyondcode-laravel-server-timing)[rollbar/rollbar-laravel

Rollbar error monitoring integration for Laravel projects

14110.4M7](/packages/rollbar-rollbar-laravel)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[kitloong/laravel-app-logger

Laravel log for your application

101.2M8](/packages/kitloong-laravel-app-logger)[label84/laravel-auth-log

Log user authentication actions in Laravel.

3654.0k](/packages/label84-laravel-auth-log)

PHPackages © 2026

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