6 |------------------------------------------------------------------------------------------------------------------
8 |------------------------------------------------------------------------------------------------------------------
10 | Clockwork is enabled by default only when your application is in debug mode. Here you can explicitly enable or
11 | disable Clockwork. When disabled, no data is collected and the api and web ui are inactive.
15 'enable' => env('CLOCKWORK_ENABLE', false),
18 |------------------------------------------------------------------------------------------------------------------
20 |------------------------------------------------------------------------------------------------------------------
22 | You can enable or disable various Clockwork features here. Some features have additional settings (eg. slow query
23 | threshold for database queries).
29 // Cache usage stats and cache queries including results
33 // Collect cache queries
34 'collect_queries' => true,
36 // Collect values from cache queries (high performance impact with a very high number of queries)
37 'collect_values' => false,
40 // Database usage stats and queries
44 // Collect database queries (high performance impact with a very high number of queries)
45 'collect_queries' => true,
47 // Collect details of models updates (high performance impact with a lot of model updates)
48 'collect_models_actions' => true,
50 // Collect details of retrieved models (very high performance impact with a lot of models retrieved)
51 'collect_models_retrieved' => false,
53 // Query execution time threshold in miliseconds after which the query will be marked as slow
54 'slow_threshold' => null,
56 // Collect only slow database queries
59 // Detect and report duplicate (N+1) queries
60 'detect_duplicate_queries' => false,
67 // Ignored events (framework events are ignored by default)
69 // App\Events\UserRegistered::class,
74 // Laravel log (you can still log directly to Clockwork with laravel log disabled)
84 // Performance metrics
86 // Allow collecting of client metrics. Requires separate clockwork-browser npm package.
87 'client_metrics' => true,
90 // Dispatched queue jobs
104 // Collect only routes from particular namespaces (only application routes by default)
105 'only_namespaces' => ['App'],
112 // Collect views including view data (high performance impact with a high number of views)
113 'collect_data' => false,
115 // Use Twig profiler instead of Laravel events for apps using laravel-twigbridge (more precise, but does
116 // not support collecting view data)
117 'use_twig_profiler' => false,
123 |------------------------------------------------------------------------------------------------------------------
125 |------------------------------------------------------------------------------------------------------------------
127 | Clockwork comes with a web UI accessibla via http://your.app/clockwork. Here you can enable or disable this
128 | feature. You can also set a custom path for the web UI.
135 |------------------------------------------------------------------------------------------------------------------
137 |------------------------------------------------------------------------------------------------------------------
139 | Clockwork can show a toolbar with basic metrics on all responses. Here you can enable or disable this feature.
140 | Requires a separate clockwork-browser npm library.
141 | For installation instructions see https://underground.works/clockwork/#docs-viewing-data
148 |------------------------------------------------------------------------------------------------------------------
149 | HTTP requests collection
150 |------------------------------------------------------------------------------------------------------------------
152 | Clockwork collects data about HTTP requests to your app. Here you can choose which requests should be collected.
157 // With on-demand mode enabled, Clockwork will only profile requests when the browser extension is open or you
158 // manually pass a "clockwork-profile" cookie or get/post data key.
159 // Optionally you can specify a "secret" that has to be passed as the value to enable profiling.
160 'on_demand' => false,
162 // Collect only errors (requests with HTTP 4xx and 5xx responses)
163 'errors_only' => false,
165 // Response time threshold in miliseconds after which the request will be marked as slow
166 'slow_threshold' => null,
168 // Collect only slow requests
169 'slow_only' => false,
171 // Sample the collected requests (eg. set to 100 to collect only 1 in 100 requests)
174 // List of URIs that should not be collected
176 '/horizon/.*', // Laravel Horizon requests
177 '/telescope/.*', // Laravel Telescope requests
178 '/_debugbar/.*', // Laravel DebugBar requests
181 // List of URIs that should be collected, any other URI will not be collected if not empty
186 // Don't collect OPTIONS requests, mostly used in the CSRF pre-flight requests and are rarely of interest
187 'except_preflight' => true,
191 |------------------------------------------------------------------------------------------------------------------
192 | Artisan commands collection
193 |------------------------------------------------------------------------------------------------------------------
195 | Clockwork can collect data about executed artisan commands. Here you can enable and configure which commands
196 | should be collected.
201 // Enable or disable collection of executed Artisan commands
204 // List of commands that should not be collected (built-in commands are not collected by default)
209 // List of commands that should be collected, any other command will not be collected if not empty
214 // Enable or disable collection of command output
215 'collect_output' => false,
217 // Enable or disable collection of built-in Laravel commands
218 'except_laravel_commands' => true,
222 |------------------------------------------------------------------------------------------------------------------
223 | Queue jobs collection
224 |------------------------------------------------------------------------------------------------------------------
226 | Clockwork can collect data about executed queue jobs. Here you can enable and configure which queue jobs should
232 // Enable or disable collection of executed queue jobs
235 // List of queue jobs that should not be collected
237 // App\Jobs\ExpensiveJob::class
240 // List of queue jobs that should be collected, any other queue job will not be collected if not empty
242 // App\Jobs\BuggyJob::class
247 |------------------------------------------------------------------------------------------------------------------
249 |------------------------------------------------------------------------------------------------------------------
251 | Clockwork can collect data about executed tests. Here you can enable and configure which tests should be
257 // Enable or disable collection of ran tests
260 // List of tests that should not be collected
262 // Tests\Unit\ExampleTest::class
267 |------------------------------------------------------------------------------------------------------------------
268 | Enable data collection when Clockwork is disabled
269 |------------------------------------------------------------------------------------------------------------------
271 | You can enable this setting to collect data even when Clockwork is disabled. Eg. for future analysis.
275 'collect_data_always' => false,
278 |------------------------------------------------------------------------------------------------------------------
280 |------------------------------------------------------------------------------------------------------------------
282 | Configure how is the metadata collected by Clockwork stored. Two options are available:
283 | - files - A simple fast storage implementation storing data in one-per-request files.
284 | - sql - Stores requests in a sql database. Supports MySQL, Postgresql, Sqlite and requires PDO.
288 'storage' => 'files',
290 // Path where the Clockwork metadata is stored
291 'storage_files_path' => storage_path('clockwork'),
293 // Compress the metadata files using gzip, trading a little bit of performance for lower disk usage
294 'storage_files_compress' => false,
296 // SQL database to use, can be a name of database configured in database.php or a path to a sqlite file
297 'storage_sql_database' => storage_path('clockwork.sqlite'),
299 // SQL table name to use, the table is automatically created and udpated when needed
300 'storage_sql_table' => 'clockwork',
302 // Maximum lifetime of collected metadata in minutes, older requests will automatically be deleted, false to disable
303 'storage_expiration' => 60 * 24 * 7,
306 |------------------------------------------------------------------------------------------------------------------
308 |------------------------------------------------------------------------------------------------------------------
310 | Clockwork can be configured to require authentication before allowing access to the collected data. This might be
311 | useful when the application is publicly accessible. Setting to true will enable a simple authentication with a
312 | pre-configured password. You can also pass a class name of a custom implementation.
316 'authentication' => false,
318 // Password for the simple authentication
319 'authentication_password' => 'VerySecretPassword',
322 |------------------------------------------------------------------------------------------------------------------
323 | Stack traces collection
324 |------------------------------------------------------------------------------------------------------------------
326 | Clockwork can collect stack traces for log messages and certain data like database queries. Here you can set
327 | whether to collect stack traces, limit the number of collected frames and set further configuration. Collecting
328 | long stack traces considerably increases metadata size.
333 // Enable or disable collecting of stack traces
336 // Limit the number of frames to be collected
339 // List of vendor names to skip when determining caller, common vendors are automatically added
344 // List of namespaces to skip when determining caller
345 'skip_namespaces' => [
349 // List of class names to skip when determining caller
351 // App\CustomLog::class
357 |------------------------------------------------------------------------------------------------------------------
359 |------------------------------------------------------------------------------------------------------------------
361 | Clockwork serializes the collected data to json for storage and transfer. Here you can configure certain aspects
362 | of serialization. Serialization has a large effect on the cpu time and memory usage.
366 // Maximum depth of serialized multi-level arrays and objects
367 'serialization_depth' => 10,
369 // A list of classes that will never be serialized (eg. a common service container class)
370 'serialization_blackbox' => [
371 \Illuminate\Container\Container::class,
372 \Illuminate\Foundation\Application::class,
376 |------------------------------------------------------------------------------------------------------------------
378 |------------------------------------------------------------------------------------------------------------------
380 | Clockwork comes with a "clock" global helper function. You can use this helper to quickly log something and to
381 | access the Clockwork instance.
385 'register_helpers' => true,
388 |------------------------------------------------------------------------------------------------------------------
389 | Send Headers for AJAX request
390 |------------------------------------------------------------------------------------------------------------------
392 | When trying to collect data the AJAX method can sometimes fail if it is missing required headers. For example, an
393 | API might require a version number using Accept headers to route the HTTP request to the correct codebase.
398 // 'Accept' => 'application/vnd.com.whatever.v1+json',
402 |------------------------------------------------------------------------------------------------------------------
404 |------------------------------------------------------------------------------------------------------------------
406 | Clockwork supports the W3C Server Timing specification, which allows for collecting a simple performance metrics
407 | in a cross-browser way. Eg. in Chrome, your app, database and timeline event timings will be shown in the Dev
408 | Tools network tab. This setting specifies the max number of timeline events that will be sent. Setting to false
409 | will disable the feature.
413 'server_timing' => 10,