PHPackages                             vmorozov/laravel-log-traces - 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. vmorozov/laravel-log-traces

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

vmorozov/laravel-log-traces
===========================

Laravel library for providing trace ids in logs.

v1.3.2(3mo ago)0282↑22.2%[1 PRs](https://github.com/freezer278/laravel-log-traces/pulls)MITPHPPHP ^8.1CI passing

Since Mar 2Pushed 2mo agoCompare

[ Source](https://github.com/freezer278/laravel-log-traces)[ Packagist](https://packagist.org/packages/vmorozov/laravel-log-traces)[ Docs](https://github.com/vmorozov/laravel-log-traces)[ GitHub Sponsors](https://github.com/vmorozov)[ RSS](/packages/vmorozov-laravel-log-traces/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (10)Versions (12)Used By (0)

Logs tracing for laravel framework
==================================

[](#logs-tracing-for-laravel-framework)

[![Latest Version on Packagist](https://camo.githubusercontent.com/6d54ec3fca46206cf552b6eeda087a09b99788a765ddf501c9a9c7ee96916585/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f766d6f726f7a6f762f6c61726176656c2d6c6f672d7472616365732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vmorozov/laravel-log-traces)[![Tests](https://camo.githubusercontent.com/793bfb55f5a12b25f4afe4a404125968e79454e42c1c70838a00734855908891/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f667265657a65723237382f6c61726176656c2d6c6f672d7472616365732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/freezer278/laravel-log-traces/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/2b8f4be1b30d9353336e593a132d9dcfe9bec3a15af27a250b771c6800c1f705/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f766d6f726f7a6f762f6c61726176656c2d6c6f672d7472616365732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vmorozov/laravel-log-traces)

A Laravel package for providing log tracing (trace ids and span ids) in your Laravel application.
This package makes it easy to debug your application by providing a way to trace logs for specific api requests or console commands and identify issues.

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

[](#installation)

1. Install the package via composer:

```
composer require vmorozov/laravel-log-traces
```

2. Publish vendor files:

```
php artisan vendor:publish --provider="VMorozov\\LaravelLogTraces\\LogTracesServiceProvider"
```

Upgrading version
-----------------

[](#upgrading-version)

1. Update the package version in `composer.json`
2. Run

```
composer update vmorozov/laravel-log-traces
```

Usage
-----

[](#usage)

This package provides a middleware that adds trace ids to the logs and console commands.
It adds a `trace_id` field and `span_id` field to the log context to identify current trace and span of app execution in the logs.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Vladimir Morozov](https://github.com/vmorozov)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance85

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

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

Every ~2 days

Total

8

Last Release

95d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f1487aab1174b98688909d82fa4014f59f66c80242d61fef733ae1045ab17f4d?d=identicon)[vmorozov](/maintainers/vmorozov)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")[![freezer278](https://avatars.githubusercontent.com/u/17979033?v=4)](https://github.com/freezer278 "freezer278 (1 commits)")

---

Tags

vmorozovlaravel-log-traces

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/vmorozov-laravel-log-traces/health.svg)

```
[![Health](https://phpackages.com/badges/vmorozov-laravel-log-traces/health.svg)](https://phpackages.com/packages/vmorozov-laravel-log-traces)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M153](/packages/spatie-laravel-health)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.3M42](/packages/spatie-laravel-pdf)[keepsuit/laravel-opentelemetry

OpenTelemetry integration for laravel

162476.0k](/packages/keepsuit-laravel-opentelemetry)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3913.7k](/packages/rawilk-profile-filament-plugin)[spatie/laravel-error-share

Share your Laravel errors to Flare

431.3M5](/packages/spatie-laravel-error-share)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

43140.3k](/packages/harris21-laravel-fuse)

PHPackages © 2026

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