Ship production optimization M1-M12.5A: queues, metrics, HTTP observability, and vector search reliability.

Keep similar-ai from tripping the global circuit on a lone URL 502, clamp Qdrant search to 100, and add Server-Timing plus slow-request logging. Studio shared props, Academy S3 exists caching, heat chunking, and Redis/scheduler hygiene stay in this rollout.
This commit is contained in:
2026-08-25 07:58:47 +02:00
parent f52879edbb
commit 8a80aae21e
114 changed files with 9293 additions and 284 deletions
@@ -8,6 +8,7 @@ use App\Models\CollectionComment;
use App\Models\NovaCardComment;
use App\Models\StoryComment;
use App\Models\User;
use App\Services\Metrics\ArtworkHourlySnapshotWindow;
use App\Support\AvatarUrl;
use Illuminate\Support\Facades\DB;
@@ -21,6 +22,7 @@ final class CreatorStudioOverviewService
private readonly CreatorStudioPreferenceService $preferences,
private readonly CreatorStudioChallengeService $challenges,
private readonly CreatorStudioGrowthService $growth,
private readonly ArtworkHourlySnapshotWindow $snapshotWindow,
) {
}
@@ -32,15 +34,24 @@ final class CreatorStudioOverviewService
$challengeData = $this->challenges->build($user);
$growthData = $this->growth->build($user, $preferences['analytics_range_days']);
$featuredContent = $this->content->selectedItems($user, $preferences['featured_content']);
$window = $this->snapshotWindow->userWindow((int) $user->id, 30);
return [
'kpis' => [
'total_content' => $analytics['totals']['content_count'],
'views_30d' => $analytics['totals']['views'],
'appreciation_30d' => $analytics['totals']['appreciation'],
'shares_30d' => $analytics['totals']['shares'],
'comments_30d' => $analytics['totals']['comments'],
'views_30d' => $window['views'],
'appreciation_30d' => $window['favourites'],
'shares_30d' => $window['shares'],
'comments_30d' => $window['comments'],
'followers' => $analytics['totals']['followers'],
'snapshot_window' => [
'requested_days' => $window['requested_days'],
'table_coverage_days' => $window['table_coverage_days'],
'user_coverage_days' => $window['user_coverage_days'],
'window_complete' => $window['window_complete'],
'oldest_bucket' => $window['oldest_bucket'],
'newest_bucket' => $window['newest_bucket'],
],
],
'module_summaries' => $moduleSummaries,
'quick_create' => $this->content->quickCreate(),