Skip to content
Jean-Marc Strauven edited this page Aug 6, 2025 · 3 revisions

Laravel ChronoTrace

⏱️ Record and replay Laravel requests deterministically

Capture all database queries, cache operations, HTTP calls, and queue jobs for debugging and analysis.


πŸš€ Quick Start

Laravel ChronoTrace is a powerful debugging and monitoring tool that helps you understand exactly what happens during Laravel request execution. Perfect for debugging production issues, performance analysis, and understanding complex application flows.

What can you do with ChronoTrace?

  • 🎯 Capture complete HTTP request execution context
  • πŸ”„ Replay traces to analyze what happened during specific requests
  • πŸ” Debug production issues with comprehensive event logs
  • πŸ“Š Monitor application performance and identify bottlenecks

Installation

composer require --dev grazulex/laravel-chronotrace
php artisan chronotrace:install

Your First Trace

  1. Enable recording (already enabled by default in development)
  2. Make a request to your application
  3. View the trace using php artisan chronotrace:list
  4. Replay the trace with php artisan chronotrace:replay {trace-id}

πŸ“š Documentation Structure

Getting Started

Core Concepts

Configuration

Commands & Tools

Advanced Usage

Examples & Guides

Reference


🎯 Key Features

Smart Recording Modes

  • Always - Record every request (development)
  • Sample - Record percentage of successful requests
  • Error-only - Record only failed requests (production)
  • Targeted - Record specific routes or conditions

Comprehensive Event Capture

  • Database queries with bindings and execution time
  • Cache operations (get, set, forget, etc.)
  • HTTP requests to external APIs
  • Queue jobs and their payloads
  • Custom events for application-specific tracking

Flexible Analysis

  • Complete timeline of request execution
  • Performance metrics and bottleneck identification
  • Event filtering to focus on specific areas
  • Replay capability for detailed investigation

Production Ready

  • Minimal performance impact with async storage
  • PII scrubbing to protect sensitive data
  • Automatic cleanup with configurable retention
  • Multiple storage backends (local, S3, custom)

πŸ’‘ Common Use Cases

πŸ› Debugging Production Issues

Record traces when errors occur to understand exactly what went wrong, including all database queries and external API calls that led to the failure.

⚑ Performance Optimization

Identify slow queries, excessive cache misses, or inefficient API calls by analyzing trace timelines and performance metrics.

πŸ” Understanding Complex Flows

Trace multi-step processes involving databases, caches, queues, and external services to understand the complete execution flow.

πŸ§ͺ Testing & Development

Record traces during development to ensure your application behaves as expected and to document complex business logic.


🀝 Getting Help


Ready to start? Head over to Installation & Setup to get ChronoTrace running in your Laravel application!

Clone this wiki locally