Skip to content

Commit a2c7146

Browse files
committed
Re-arrange collectors
1 parent cc3778a commit a2c7146

File tree

2 files changed

+65
-58
lines changed

2 files changed

+65
-58
lines changed

docs/collectors.md

Lines changed: 65 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -8,34 +8,31 @@ hide:
88

99
## Collectors
1010

11-
This package includes some custom collectors:
12-
13-
- [QueryCollector](#querycollector): Show all queries, including binding + timing
14-
- [RouteCollector](#routecollector): Show information about the current Route.
15-
- [ViewCollector](#viewcollector): Show the currently loaded views. (Optionally: display the shared data)
16-
- EventsCollector: Show all events
17-
- GateCollector: Show the gates that are checked
18-
- PennantCollector: Show Pennant flags
19-
- LaravelCollector: Show the Laravel version and Environment. (disabled by default)
20-
- SymfonyRequestCollector: replaces the RequestCollector with more information about the request/response
21-
- LogsCollector: Show the latest log entries from the storage logs. (disabled by default)
22-
- FilesCollector: Show the files that are included/required by PHP. (disabled by default)
23-
- ConfigCollector: Display the values from the config files. (disabled by default)
24-
- CacheCollector: Display all cache events. (disabled by default)
25-
26-
Bootstraps the following collectors for Laravel:
27-
28-
- LogCollector: Show all Log messages
29-
- SymfonyMailCollector for Mail
30-
31-
And the default collectors:
32-
33-
- PhpInfoCollector
34-
- [MessagesCollector](#messages-collector)
35-
- [TimeDataCollector](#timeline-collector) (With Booting and Application timing)
36-
- MemoryCollector
37-
- ExceptionsCollector
38-
11+
This package includes with these Collectors enabled by default:
12+
13+
- [Queries](#db): Show all database queries
14+
- [Messages](#messages): Debug messages and objects
15+
- [Logs](#log): Show all Log messages (Show in Messages when available)
16+
- [Views](#views): Show the currently loaded views.
17+
- [Timeline](#time): Timeline with Booting and Application timing
18+
- [Route](#route): Show information about the current Route.
19+
- Session: Current session data
20+
- Request: Request data
21+
- Livewire: Only active when Livewire is used
22+
- PhpInfo: Current PHP version
23+
- Memory: Memory usage
24+
- Exceptions: Errors with stacktrace
25+
26+
These collectors can be enabled in the config:
27+
- Auth: Logged in status
28+
- Events: Show all events
29+
- Mail: Sent emails
30+
- Gates: Show the gates that are checked
31+
- Laravel Info: Show the Laravel version and Environment.
32+
- Files: Show the files that are included/required by PHP.
33+
- Config: Display the values from the config files.
34+
- Cache: Display all cache events.
35+
- Pennant: Show Pennant flags
3936

4037
To enable or disable any of the collectors, set the configuration to `true` or `false`. Some collector have additional options in the configuration:
4138

@@ -87,7 +84,7 @@ To enable or disable any of the collectors, set the configuration to `true` or `
8784

8885
</details>
8986

90-
### QueryCollector
87+
### Query Collector { #db }
9188

9289
<!-- md:version v1.0 -->
9390
<!-- md:feature collectors.db -->
@@ -160,42 +157,46 @@ If you want to avoid any limits, you can set the option to `null`
160157

161158
![Query Limits](img/query-limits.png)
162159

163-
### RouteCollector
160+
161+
## Messages Collector { #messages }
164162

165163
<!-- md:version v1.0 -->
166-
<!-- md:feature collectors.route -->
164+
<!-- md:feature collectors.messages -->
167165

168-
This shows the current route and middleware.
166+
The Message collectors gathers all messages from `debug()` calls and anything written to the logs.
169167

170-
![RouteCollector](img/route.png)
168+
You can pass multiple parameters to `debug()`, even complex object.
171169

172-
### Timeline Collector
170+
### Trace
171+
172+
When calling `debug()`, the source of the call is shown and can be opened with your IDE.
173+
174+
<!-- md:version v3.10.0 -->
175+
<!-- md:feature options.messages.trace -->
176+
177+
![Messages Collector](img/messages.png)
178+
179+
## Log Collectors { #log }
173180

174181
<!-- md:version v1.0 -->
175-
<!-- md:feature collectors.time -->
182+
<!-- md:feature collectors.log -->
176183

177-
![Timeline Collector](img/timeline.png)
184+
When the [Messages Collector](#messages) is enabled, Log messages are added to the Messages tab. Otherwise a Monolog tab will show with just the log messages
178185

179-
```php
180-
'options' => [
181-
'time' => [
182-
'memory_usage' => false, // Calculated by subtracting memory start and end, it may be inaccurate
183-
],
184-
]
185-
```
186+
![Monolog](img/monolog.png)
186187

187-
### ViewCollector
188+
### ViewCollector { #views }
188189

189190
<!-- md:version v1.0 -->
190191
<!-- md:feature collectors.views -->
191192

192193
The ViewCollector shows views and has the following features:
193194

194-
- Show used templates and source
195-
- Optionally add them to the timeline
196-
- Group similar views (useful for components)
197-
- Exclude folders (eg. for Filament or other vendors)
198-
- Optionally show data (this can be resource heavy)
195+
- Show used templates and source
196+
- Optionally add them to the timeline
197+
- Group similar views (useful for components)
198+
- Exclude folders (eg. for Filament or other vendors)
199+
- Optionally show data (this can be resource heavy)
199200

200201
![ViewCollector](img/views.png)
201202

@@ -213,24 +214,30 @@ The ViewCollector shows views and has the following features:
213214

214215
```
215216

216-
## Messages Collector
217+
### RouteCollector { #route }
217218

218219
<!-- md:version v1.0 -->
219-
<!-- md:feature collectors.messages -->
220+
<!-- md:feature collectors.route -->
220221

221-
The Message collectors gathers all messages from `debug()` calls and anything written to the logs.
222+
This shows the current route and middleware.
222223

223-
You can pass multiple parameters to `debug()`, even complex object.
224+
![RouteCollector](img/route.png)
224225

225-
### Trace
226+
### Timeline Collector { #time }
226227

227-
When calling `debug()`, the source of the call is shown and can be opened with your IDE.
228+
<!-- md:version v1.0 -->
229+
<!-- md:feature collectors.time -->
228230

229-
<!-- md:version v3.10.0 -->
230-
<!-- md:feature options.messages.trace -->
231+
![Timeline Collector](img/timeline.png)
231232

233+
```php
234+
'options' => [
235+
'time' => [
236+
'memory_usage' => false, // Calculated by subtracting memory start and end, it may be inaccurate
237+
],
238+
]
239+
```
232240

233-
![Messages Collector](img/messages.png)
234241
## Additional options
235242

236243
```php

docs/img/monolog.png

11 KB
Loading

0 commit comments

Comments
 (0)