| Conditions | 2 |
| Paths | 4 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function handle($request, Closure $next) |
||
| 25 | { |
||
| 26 | $response = $next($request); |
||
| 27 | try { |
||
| 28 | $this->collector->collect([$request, $response]); |
||
| 29 | } catch (\Exception $e) { |
||
| 30 | app('log')->error('PrometheusMiddleware: failed to collect request metrics.', ['exception' => $e]); |
||
| 31 | } finally { |
||
| 32 | return $response; |
||
| 33 | } |
||
| 36 |