vmorozov / laravel-log-traces
Laravel library for providing trace ids in logs.
Fund package maintenance!
Requires
- php: ^8.1
- illuminate/contracts: >=9.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- laravel/pint: ^1.13
- orchestra/testbench: ^v9.5.2 || ^10.0.0
- phpunit/phpunit: ^11.4
This package is auto-updated.
Last update: 2026-03-11 07:34:25 UTC
README
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
- Install the package via composer:
composer require vmorozov/laravel-log-traces
- Publish vendor files:
php artisan vendor:publish --provider="VMorozov\\LaravelLogTraces\\LogTracesServiceProvider"
Upgrading version
- Update the package version in
composer.json - Run
composer update vmorozov/laravel-log-traces
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
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.