|
1 | 1 | <?php |
2 | 2 |
|
3 | | -use Honeybadger\HoneybadgerLaravel\Breadcrumbs; |
| 3 | +use Honeybadger\BulkEventDispatcher; |
| 4 | +use Honeybadger\HoneybadgerLaravel\HoneybadgerLaravel; |
4 | 5 |
|
5 | 6 | return [ |
6 | 7 | /** |
|
77 | 78 | /** |
78 | 79 | * Older PHP functions use the Error class, while modern PHP mostly uses Exception. |
79 | 80 | * Specify if you'd like Honeybadger to report both types of errors. |
| 81 | + * The shutdown handler is required flushing any remaining events that were queued using Honeybadger.event(). |
80 | 82 | */ |
81 | 83 | 'handlers' => [ |
82 | 84 | 'exception' => true, |
83 | 85 | 'error' => true, |
| 86 | + 'shutdown' => true, |
84 | 87 | ], |
85 | 88 |
|
86 | 89 | /** |
|
111 | 114 | 'enabled' => true, |
112 | 115 |
|
113 | 116 | /** |
114 | | - * Events which should automatically be recorded by the Honeybadger client. |
| 117 | + * Events which should automatically be recorded by the Honeybadger client as breadcrumbs. |
115 | 118 | * Note that to track redis events, you need to call `Redis::enableEvents()` in your app. |
116 | 119 | */ |
117 | | - 'automatic' => [ |
118 | | - Breadcrumbs\DatabaseQueryExecuted::class, |
119 | | - Breadcrumbs\DatabaseTransactionStarted::class, |
120 | | - Breadcrumbs\DatabaseTransactionCommitted::class, |
121 | | - Breadcrumbs\DatabaseTransactionRolledBack::class, |
122 | | - Breadcrumbs\CacheHit::class, |
123 | | - Breadcrumbs\CacheMiss::class, |
124 | | - Breadcrumbs\JobQueued::class, |
125 | | - Breadcrumbs\MailSending::class, |
126 | | - Breadcrumbs\MailSent::class, |
127 | | - Breadcrumbs\MessageLogged::class, |
128 | | - Breadcrumbs\NotificationSending::class, |
129 | | - Breadcrumbs\NotificationSent::class, |
130 | | - Breadcrumbs\NotificationFailed::class, |
131 | | - Breadcrumbs\RedisCommandExecuted::class, |
132 | | - Breadcrumbs\RouteMatched::class, |
133 | | - Breadcrumbs\ViewRendered::class, |
134 | | - ], |
| 120 | + 'automatic' => HoneybadgerLaravel::DEFAULT_EVENTS, |
135 | 121 | ], |
136 | 122 |
|
137 | 123 | /** |
|
141 | 127 | * Learn more about checkins at https://docs.honeybadger.io/api/reporting-check-ins/. |
142 | 128 | */ |
143 | 129 | 'checkins' => [], |
| 130 | + |
| 131 | + 'events' => [ |
| 132 | + /** |
| 133 | + * Enable sending application events to Honeybadger Insights. |
| 134 | + * Setting this to false will disable automatic events collection and the event() function. |
| 135 | + */ |
| 136 | + 'enabled' => false, |
| 137 | + |
| 138 | + /** |
| 139 | + * The number of events to queue before sending them to Honeybadger. |
| 140 | + */ |
| 141 | + 'bulk_threshold' => BulkEventDispatcher::BULK_THRESHOLD, |
| 142 | + |
| 143 | + /** |
| 144 | + * The number of seconds to wait before sending queued events to Honeybadger. |
| 145 | + */ |
| 146 | + 'dispatch_interval_seconds' => BulkEventDispatcher::DISPATCH_INTERVAL_SECONDS, |
| 147 | + |
| 148 | + /** |
| 149 | + * Events which should automatically be sent to Honeybadger Insights. |
| 150 | + * Note that to track redis events, you need to call `Redis::enableEvents()` in your app. |
| 151 | + */ |
| 152 | + 'automatic' => HoneybadgerLaravel::DEFAULT_EVENTS, |
| 153 | + ], |
144 | 154 | ]; |
0 commit comments