logtide / logtide-laravel
Laravel integration for the LogTide PHP SDK
v0.7.0
2026-03-06 20:48 UTC
Requires
- php: ^8.1
- illuminate/http: ^10.0 || ^11.0 || ^12.0
- illuminate/routing: ^10.0 || ^11.0 || ^12.0
- illuminate/support: ^10.0 || ^11.0 || ^12.0
- logtide/logtide: ^0.1
Requires (Dev)
- orchestra/testbench: ^8.0 || ^9.0 || ^10.0
- phpunit/phpunit: ^10.5
This package is not auto-updated.
Last update: 2026-03-07 19:29:09 UTC
README
logtide/logtide-laravel
LogTide integration for Laravel - automatic request tracing, error capture, and breadcrumbs.
Features
- Automatic request tracing via HTTP middleware
- Error capture with full request context
- W3C Trace Context propagation (
traceparentin/out) - Laravel Log Channel - use LogTide as a logging driver
- Facade -
Logtide::info(...)static access - Breadcrumb integrations - DB queries, cache operations, queue jobs
- Auto-discovery - zero configuration needed
- Laravel 10, 11, and 12 support
Installation
composer require logtide/logtide-laravel
The service provider is auto-discovered. No manual registration needed.
Quick Start
- Add your DSN to
.env:
LOGTIDE_DSN=https://lp_your_key@your-logtide-instance.com
- Optionally publish the config:
php artisan vendor:publish --tag=logtide-config
That's it! HTTP requests are automatically traced, exceptions captured, and DB queries recorded as breadcrumbs.
Configuration
// config/logtide.php return [ 'dsn' => env('LOGTIDE_DSN'), 'service' => env('LOGTIDE_SERVICE', env('APP_NAME', 'laravel')), 'environment' => env('LOGTIDE_ENVIRONMENT', env('APP_ENV', 'production')), 'release' => env('LOGTIDE_RELEASE'), 'batch_size' => (int) env('LOGTIDE_BATCH_SIZE', 100), 'flush_interval' => (int) env('LOGTIDE_FLUSH_INTERVAL', 5000), 'max_buffer_size' => (int) env('LOGTIDE_MAX_BUFFER_SIZE', 10000), 'max_retries' => (int) env('LOGTIDE_MAX_RETRIES', 3), 'traces_sample_rate' => (float) env('LOGTIDE_TRACES_SAMPLE_RATE', 1.0), 'debug' => (bool) env('LOGTIDE_DEBUG', false), 'send_default_pii' => (bool) env('LOGTIDE_SEND_DEFAULT_PII', false), 'breadcrumbs' => [ 'db_queries' => true, 'cache' => true, 'queue' => true, 'http_client' => true, ], 'skip_paths' => ['/health', '/healthz'], ];
Using the Log Channel
Add LogTide as a logging channel in config/logging.php:
'channels' => [ 'logtide' => [ 'driver' => 'custom', 'via' => \LogTide\Laravel\LogChannel::class, 'level' => 'debug', ], ],
Then use it:
Log::channel('logtide')->info('Hello from Laravel!'); // Or set as default in .env: // LOG_CHANNEL=logtide
Using the Facade
use LogTide\Laravel\LogtideFacade as Logtide; Logtide::info('User logged in', ['user_id' => 123]); Logtide::captureException($exception);
Breadcrumb Integrations
All enabled by default in config/logtide.php:
- DB Queries - records SQL queries as breadcrumbs (via
QueryBreadcrumbIntegration) - Cache - records cache hits, misses, writes (via
CacheBreadcrumbIntegration) - Queue - records job processing events (via
QueueIntegration)
License
MIT License - see LICENSE for details.
