logtide / logtide-symfony
Symfony integration for LogTide PHP SDK - automatic request tracing, console command monitoring, and Doctrine query tracking
Package info
github.com/logtide-dev/logtide-symfony
Type:symfony-bundle
pkg:composer/logtide/logtide-symfony
Requires
- php: ^8.1
- logtide/logtide: ^0.1
- symfony/config: ^6.4 || ^7.0
- symfony/dependency-injection: ^6.4 || ^7.0
- symfony/event-dispatcher: ^6.4 || ^7.0
- symfony/http-kernel: ^6.4 || ^7.0
Requires (Dev)
- doctrine/dbal: ^3.8 || ^4.0
- phpunit/phpunit: ^10.5
- symfony/console: ^6.4 || ^7.0
Suggests
- doctrine/dbal: Required for Doctrine query breadcrumbs (^3.8 || ^4.0)
- symfony/console: Required for console command tracing (^6.4 || ^7.0)
This package is not auto-updated.
Last update: 2026-03-07 19:49:27 UTC
README
logtide/logtide-symfony
LogTide Bundle for Symfony - automatic request tracing, error capture, and breadcrumbs.
Features
- Automatic request tracing via
RequestSubscriber - Console command tracing via
ConsoleSubscriber - W3C Trace Context propagation (
traceparentin/out) - Doctrine breadcrumbs for database query tracking
- Semantic configuration - standard Symfony YAML/XML config
- Symfony 6.4 and 7.x support
Installation
composer require logtide/logtide-symfony
Register the bundle in config/bundles.php:
return [ // ... LogTide\Symfony\LogtideBundle::class => ['all' => true], ];
Quick Start
# config/packages/logtide.yaml logtide: dsn: '%env(LOGTIDE_DSN)%' service: 'my-symfony-app' environment: '%kernel.environment%'
Add LOGTIDE_DSN to your .env:
LOGTIDE_DSN=https://lp_your_key@your-logtide-instance.com
Configuration
logtide: dsn: ~ # LogTide DSN service: 'symfony' # Service name environment: ~ # Environment (production, staging, ...) release: ~ # Release / version identifier batch_size: 100 # Logs to batch before sending flush_interval: 5000 # Auto-flush interval in ms max_buffer_size: 10000 # Max logs in buffer max_retries: 3 # Max retry attempts traces_sample_rate: 1.0 # Sample rate for traces (0.0 to 1.0) debug: false # Enable debug logging send_default_pii: false # Send personally identifiable information
Event Subscribers
RequestSubscriber
Automatically traces HTTP requests:
- Starts a span on
kernel.request - Finishes the span on
kernel.response - Captures errors on
kernel.exception - Propagates
traceparentheaders
ConsoleSubscriber
Traces CLI commands:
- Starts a span on
console.command - Finishes the span on
console.terminate - Captures errors on
console.error
Integrations
SymfonyIntegration
Captures Symfony-specific context (kernel info, route parameters).
DoctrineIntegration
Records Doctrine SQL queries as breadcrumbs. Requires doctrine/dbal.
License
MIT License - see LICENSE for details.
