DEV.co
Open-Source Observability · itsgoingd

clockwork

Clockwork is a browser-based PHP development tool that surfaces real-time insights into application runtime: HTTP requests, database queries, cache/Redis operations, logs, events, queue jobs, and performance metrics. Installed via Composer, it integrates with Laravel and collects data only in debug mode by default, with configurable capture filters and a web UI or browser extension for inspection.

Source: GitHub — github.com/itsgoingd/clockwork
5.9k
GitHub stars
335
Forks
PHP
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryitsgoingd/clockwork
Owneritsgoingd
Primary languagePHP
LicenseMIT — OSI-approved
Stars5.9k
Forks335
Open issues37
Latest releasev5.2.0 (2024-02-24)
Last updated2026-06-23
Sourcehttps://github.com/itsgoingd/clockwork

What clockwork is

Server-side PHP component that instruments request/command/queue-job execution, capturing stack traces, query performance, log entries, and timeline events. Data is exposed via REST endpoint (`/clockwork` route) and filtered by request type, debug mode, and optional on-demand/error-only collection modes. Requires Laravel's Artisan for config publishing and route cache refresh.

Quickstart

Get the clockwork source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/itsgoingd/clockwork.gitcd clockwork# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Laravel Application Performance Debugging

Real-time visibility into slow database queries, N+1 detection, cache misses, and request lifecycle timing—critical for optimizing Laravel monolith performance without external APM tools.

API Development & Queue Job Profiling

Profile non-browser requests (mobile APIs, background jobs, artisan commands) with request data, dispatched events, and queued job inspection—useful when client-side DevTools are unavailable.

Development Team Onboarding & Code Tracing

Visualize application flow, stack traces, and event sequencing to help new team members understand request lifecycle without reading logs directly.

Implementation considerations

  • Composer install is straightforward; however, Laravel's `vendor:publish` command is required to configure features (commands, queue jobs profiling) and route cache must be refreshed if enabled.
  • Clockwork is debug-mode-only by default; explicitly configure collection mode (on-demand, error-only, slow-only) and optional secret-based gating to prevent unintended data exposure in shared environments.
  • Stack trace collection (default 10 frames) and database query logging incur overhead—review config for capture scope (e.g., disable in high-volume API endpoints) to avoid performance degradation.
  • Browser extension or toolbar JavaScript library installation is separate from server-side component; ensure front-end build and CSP policies align with injected client-side code.
  • No built-in data retention or archival—collected requests are ephemeral by default; implement custom storage (database, Redis) if request history is required for auditing or replay.

When to avoid it — and what to weigh

  • Non-Laravel PHP Projects — While Clockwork supports vanilla PHP, the installation and feature set are optimized for Laravel. Integration depth and documentation examples are Laravel-centric.
  • Production Monitoring & Long-Term Metrics Storage — Clockwork is a development tool; it does not provide persistent data warehousing, alerting, trend analysis, or distributed tracing suitable for production observability.
  • Multi-Team Shared Debugging Infrastructure — Clockwork stores collected data locally or in-memory by default; scaling to shared staging/QA environments with multiple concurrent developers requires custom configuration and data persistence logic.
  • Highly Sensitive Data Environments — Clockwork captures full request payloads, query strings, and log output. In PCI/HIPAA/SOC2 contexts, exposed credentials or PHI in logs require careful filtering and secure data handling—not a default feature.

License & commercial use

MIT License (permissive, OSI-approved). Allows commercial use, modification, distribution, and private use with no warranty.

MIT is a permissive OSI license that permits unrestricted commercial use (including proprietary modification and resale of integrated products). No license cost or attribution requirement beyond license notice inclusion. Verify vendor terms (e.g., any cloud hosting or SaaS integration) for additional restrictions.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityLow
DEV.co fitGood
Assessment confidenceHigh
Security considerations

Clockwork captures full request payloads, query data, and log output—sensitive data (credentials, PII, API keys) may be exposed if not filtered. Debug-mode-only activation mitigates production exposure, but on-demand or always-collect modes require explicit filtering logic. No built-in encryption or access control for collected data; implement reverse-proxy authentication or IP whitelisting if shared. Stack traces may leak code paths and internal architecture details.

Alternatives to consider

Laravel Telescope

First-party Laravel observability tool with similar request/query/event inspection but tighter framework integration, built-in database storage, and official support (though heavier footprint and production-use design).

Xdebug + IDE Integration

Low-level step debugger with breakpoint-based inspection; more powerful for source-code debugging but requires IDE setup and interactive sessions (not suitable for async jobs or production debugging).

Datadog / New Relic / Elastic APM

Enterprise observability platforms with persistent metrics, alerting, distributed tracing, and production-safe data redaction; significantly higher cost and operational overhead than Clockwork, but production-grade.

Software development agency

Build on clockwork with DEV.co software developers

Our engineers can help you integrate Clockwork into your development workflow, optimize query capture, and layer observability across your Laravel stack. Contact us to discuss your debugging and performance requirements.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

clockwork FAQ

Does Clockwork work outside Laravel?
Partially. Clockwork is usable in vanilla PHP, but installation, auto-discovery, and configuration management are optimized for Laravel. Non-Laravel projects require manual setup and lose convenience features.
Is Clockwork safe for production use?
By design, Clockwork is for development (debug-mode-only by default). Enabling it in production requires explicit configuration and carries risk of data exposure (credentials, queries in logs). Use production APM tools instead.
Where is collected data stored?
Data is stored in-memory or via configured driver; no persistent storage is provided by default. Web UI and browser extension consume data from the `/clockwork` endpoint. Custom persistence requires additional configuration.
Can I use Clockwork to profile queue jobs and artisan commands?
Yes, as of v4.1. Enable feature in config file via `vendor:publish`, then Clockwork will collect job and command execution data viewable in the web UI and browser extension.

Custom software development services

Adopting clockwork is usually one piece of a larger software development effort. As a software development agency, DEV.co provides software development services and web development expertise — pairing senior software developers and web developers with your team to design, build, and operate open-source observability software in production.

Need Expert Guidance on Laravel Tooling & Performance?

Our engineers can help you integrate Clockwork into your development workflow, optimize query capture, and layer observability across your Laravel stack. Contact us to discuss your debugging and performance requirements.