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 '/uploads/images/.*', // BookStack image requests
178 '/horizon/.*', // Laravel Horizon requests
179 '/telescope/.*', // Laravel Telescope requests
180 '/_debugbar/.*', // Laravel DebugBar requests
183 // List of URIs that should be collected, any other URI will not be collected if not empty
188 // Don't collect OPTIONS requests, mostly used in the CSRF pre-flight requests and are rarely of interest
189 'except_preflight' => true,
193 |------------------------------------------------------------------------------------------------------------------
194 | Artisan commands collection
195 |------------------------------------------------------------------------------------------------------------------
197 | Clockwork can collect data about executed artisan commands. Here you can enable and configure which commands
198 | should be collected.
203 // Enable or disable collection of executed Artisan commands
206 // List of commands that should not be collected (built-in commands are not collected by default)
211 // List of commands that should be collected, any other command will not be collected if not empty
216 // Enable or disable collection of command output
217 'collect_output' => false,
219 // Enable or disable collection of built-in Laravel commands
220 'except_laravel_commands' => true,
224 |------------------------------------------------------------------------------------------------------------------
225 | Queue jobs collection
226 |------------------------------------------------------------------------------------------------------------------
228 | Clockwork can collect data about executed queue jobs. Here you can enable and configure which queue jobs should
234 // Enable or disable collection of executed queue jobs
237 // List of queue jobs that should not be collected
239 // App\Jobs\ExpensiveJob::class
242 // List of queue jobs that should be collected, any other queue job will not be collected if not empty
244 // App\Jobs\BuggyJob::class
249 |------------------------------------------------------------------------------------------------------------------
251 |------------------------------------------------------------------------------------------------------------------
253 | Clockwork can collect data about executed tests. Here you can enable and configure which tests should be
259 // Enable or disable collection of ran tests
262 // List of tests that should not be collected
264 // Tests\Unit\ExampleTest::class
269 |------------------------------------------------------------------------------------------------------------------
270 | Enable data collection when Clockwork is disabled
271 |------------------------------------------------------------------------------------------------------------------
273 | You can enable this setting to collect data even when Clockwork is disabled. Eg. for future analysis.
277 'collect_data_always' => false,
280 |------------------------------------------------------------------------------------------------------------------
282 |------------------------------------------------------------------------------------------------------------------
284 | Configure how is the metadata collected by Clockwork stored. Two options are available:
285 | - files - A simple fast storage implementation storing data in one-per-request files.
286 | - sql - Stores requests in a sql database. Supports MySQL, Postgresql, Sqlite and requires PDO.
290 'storage' => 'files',
292 // Path where the Clockwork metadata is stored
293 'storage_files_path' => storage_path('clockwork'),
295 // Compress the metadata files using gzip, trading a little bit of performance for lower disk usage
296 'storage_files_compress' => false,
298 // SQL database to use, can be a name of database configured in database.php or a path to a sqlite file
299 'storage_sql_database' => storage_path('clockwork.sqlite'),
301 // SQL table name to use, the table is automatically created and udpated when needed
302 'storage_sql_table' => 'clockwork',
304 // Maximum lifetime of collected metadata in minutes, older requests will automatically be deleted, false to disable
305 'storage_expiration' => 60 * 24 * 7,
308 |------------------------------------------------------------------------------------------------------------------
310 |------------------------------------------------------------------------------------------------------------------
312 | Clockwork can be configured to require authentication before allowing access to the collected data. This might be
313 | useful when the application is publicly accessible. Setting to true will enable a simple authentication with a
314 | pre-configured password. You can also pass a class name of a custom implementation.
318 'authentication' => false,
320 // Password for the simple authentication
321 'authentication_password' => 'VerySecretPassword',
324 |------------------------------------------------------------------------------------------------------------------
325 | Stack traces collection
326 |------------------------------------------------------------------------------------------------------------------
328 | Clockwork can collect stack traces for log messages and certain data like database queries. Here you can set
329 | whether to collect stack traces, limit the number of collected frames and set further configuration. Collecting
330 | long stack traces considerably increases metadata size.
335 // Enable or disable collecting of stack traces
338 // Limit the number of frames to be collected
341 // List of vendor names to skip when determining caller, common vendors are automatically added
346 // List of namespaces to skip when determining caller
347 'skip_namespaces' => [
351 // List of class names to skip when determining caller
353 // App\CustomLog::class
359 |------------------------------------------------------------------------------------------------------------------
361 |------------------------------------------------------------------------------------------------------------------
363 | Clockwork serializes the collected data to json for storage and transfer. Here you can configure certain aspects
364 | of serialization. Serialization has a large effect on the cpu time and memory usage.
368 // Maximum depth of serialized multi-level arrays and objects
369 'serialization_depth' => 10,
371 // A list of classes that will never be serialized (eg. a common service container class)
372 'serialization_blackbox' => [
373 \Illuminate\Container\Container::class,
374 \Illuminate\Foundation\Application::class,
378 |------------------------------------------------------------------------------------------------------------------
380 |------------------------------------------------------------------------------------------------------------------
382 | Clockwork comes with a "clock" global helper function. You can use this helper to quickly log something and to
383 | access the Clockwork instance.
387 'register_helpers' => true,
390 |------------------------------------------------------------------------------------------------------------------
391 | Send Headers for AJAX request
392 |------------------------------------------------------------------------------------------------------------------
394 | When trying to collect data the AJAX method can sometimes fail if it is missing required headers. For example, an
395 | API might require a version number using Accept headers to route the HTTP request to the correct codebase.
400 // 'Accept' => 'application/vnd.com.whatever.v1+json',
404 |------------------------------------------------------------------------------------------------------------------
406 |------------------------------------------------------------------------------------------------------------------
408 | Clockwork supports the W3C Server Timing specification, which allows for collecting a simple performance metrics
409 | in a cross-browser way. Eg. in Chrome, your app, database and timeline event timings will be shown in the Dev
410 | Tools network tab. This setting specifies the max number of timeline events that will be sent. Setting to false
411 | will disable the feature.
415 'server_timing' => 10,