From 0003ad95fa091353827198d0a45cd63a3784479f Mon Sep 17 00:00:00 2001 From: Agando Date: Wed, 29 Jul 2026 20:46:12 +0200 Subject: auto: 2026-07-29_20:50 changes — gunes sponsorluk page, bunq payment modal, AI platforms, news W30 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/debug/stats.php | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 api/debug/stats.php (limited to 'api/debug/stats.php') diff --git a/api/debug/stats.php b/api/debug/stats.php new file mode 100644 index 0000000..dd0b0db --- /dev/null +++ b/api/debug/stats.php @@ -0,0 +1,55 @@ + $hash, 'message' => $e['message'] ?? '', 'count' => 0, 'type' => $t]; + } + $topErrors[$hash]['count'] += $e['count'] ?? 1; + } +} + +usort($topErrors, fn($a, $b) => $b['count'] - $a['count']); +$topErrors = array_slice($topErrors, 0, 20); +ksort($byDay); + +json_response([ + 'success' => true, + 'total_errors' => $total, + 'total_sessions' => count($sessions), + 'by_type' => $byType, + 'by_severity' => $bySeverity, + 'by_category' => $byCategory, + 'by_module' => $byModule, + 'by_day' => $byDay, + 'top_errors' => $topErrors, + 'generated_at' => date('c'), +]); -- cgit v1.2.3