The only tool you need to know what is happening and how to fix it.
Go alertingexception-trackerissue-trackinglogsmetricsmonitoringobservability-platformopen-telemetryotelsession-replaytelemetrytraces
loading circle and full server memory
ddux04ebd8f939e1
diff --git a/backend/app/controllers/dashboard.controller.go b/backend/app/controllers/dashboard.controller.goindex e6e7ebaf..f484370a 100644--- a/backend/app/controllers/dashboard.controller.go+++ b/backend/app/controllers/dashboard.controller.go@@ -134,14 +134,14 @@ func (d dashboardController) GetDashboard(c *gin.Context) {memPrev, _ := repositories.MetricRecordRepository.GetAverageBetween(c, projectId, models.MetricNameMemoryUsage, prevStart, prevEnd)metrics = append(metrics, buildMetric("memory_usage", "Memory Usage", memCurrent, "MB", memTrend, memPrev, "memory"))- // 7. Memory Usage Percentage- memPcntTrend, err := repositories.MetricRecordRepository.GetAverageByInterval(c, projectId, models.MetricNameMemoryUsagePcnt, start, end, intervalMinutes)+ // 7. Total System Memory (MB)+ memTotalTrend, err := repositories.MetricRecordRepository.GetAverageByInterval(c, projectId, models.MetricNameMemoryTotal, start, end, intervalMinutes)if err != nil {panic(err)}- memPcntCurrent := getLastValue(memPcntTrend)- memPcntPrev, _ := repositories.MetricRecordRepository.GetAverageBetween(c, projectId, models.MetricNameMemoryUsagePcnt, prevStart, prevEnd)- metrics = append(metrics, buildMetric("memory_usage_pcnt", "Memory %", memPcntCurrent, "%", memPcntTrend, memPcntPrev, "memory_pcnt"))+ memTotalCurrent := getLastValue(memTotalTrend)+ memTotalPrev, _ := repositories.MetricRecordRepository.GetAverageBetween(c, projectId, models.MetricNameMemoryTotal, prevStart, prevEnd)+ metrics = append(metrics, buildMetric("memory_total", "Total Memory", memTotalCurrent, "MB", memTotalTrend, memTotalPrev, "memory_total"))// 8. Go RoutinesgoRoutinesTrend, err := repositories.MetricRecordRepository.GetAverageByInterval(c, projectId, models.MetricNameGoRoutines, start, end, intervalMinutes)@@ -270,13 +270,8 @@ func calculateStatus(value float64, metricType string) string {return "warning"}return "healthy"- case "memory_pcnt":- // Higher is worse for memory percentage- if value > 90 {- return "critical"- } else if value > 70 {- return "warning"- }+ case "memory_total":+ // Total memory is informational - always healthyreturn "healthy"case "go_routines":// Higher may indicate goroutine leaksdiff --git a/backend/app/models/metric_record.model.go b/backend/app/models/metric_record.model.goindex 3b5814f2..b65c08a9 100644--- a/backend/app/models/metric_record.model.go+++ b/backend/app/models/metric_record.model.go@@ -10,12 +10,12 @@ type MetricRecord struct {}const (- MetricNameMemoryUsage = "mem.used"- MetricNameMemoryUsagePcnt = "mem.used_pcnt"- MetricNameCpuUsage = "cpu.used_pcnt"- MetricNameGoRoutines = "go.go_routines"- MetricNameHeapObjects = "go.heap_objects"- MetricNameNumGC = "go.num_gc"- MetricNameGCPauseTotal = "go.gc_pause"+ MetricNameMemoryUsage = "mem.used"+ MetricNameMemoryTotal = "mem.total"+ MetricNameCpuUsage = "cpu.used_pcnt"+ MetricNameGoRoutines = "go.go_routines"+ MetricNameHeapObjects = "go.heap_objects"+ MetricNameNumGC = "go.num_gc"+ MetricNameGCPauseTotal = "go.gc_pause"// other metric names are custom and added by the clients)diff --git a/backend/backend b/backend/backendnew file mode 100755index 00000000..80b2a17fBinary files /dev/null and b/backend/backend differdiff --git a/clients/go-client/traceway.go b/clients/go-client/traceway.goindex e01e87b0..39a03eac 100644--- a/clients/go-client/traceway.go+++ b/clients/go-client/traceway.go@@ -323,13 +323,13 @@ func InitCollectionFrameStore(}const (- MetricNameMemoryUsage = "mem.used"- MetricNameMemoryUsagePcnt = "mem.used_pcnt"- MetricNameCpuUsage = "cpu.used_pcnt"- MetricNameGoRoutines = "go.go_routines"- MetricNameHeapObjects = "go.heap_objects"- MetricNameNumGC = "go.num_gc"- MetricNameGCPauseTotal = "go.gc_pause"+ MetricNameMemoryUsage = "mem.used"+ MetricNameMemoryTotal = "mem.total"+ MetricNameCpuUsage = "cpu.used_pcnt"+ MetricNameGoRoutines = "go.go_routines"+ MetricNameHeapObjects = "go.heap_objects"+ MetricNameNumGC = "go.num_gc"+ MetricNameGCPauseTotal = "go.gc_pause")func (s *CollectionFrameStore) processMetrics() {@@ -367,8 +367,8 @@ func (s *CollectionFrameStore) safeProcessMetrics() {totalMem, err := mem.GetTotalMemory()if err == nil && totalMem > 0 {- memPercent := (float64(m.Alloc) / float64(totalMem)) * 100- CaptureMetric(MetricNameMemoryUsagePcnt, memPercent)+ // Convert bytes to MB for total system memory+ CaptureMetric(MetricNameMemoryTotal, float64(totalMem)/1024/1024)} else {if s.debug {log.Println("Traceway total mem not read", err)diff --git a/frontend/src/lib/components/dashboard/metric-card.svelte b/frontend/src/lib/components/dashboard/metric-card.svelteindex 7f78009f..7dbc4af8 100644--- a/frontend/src/lib/components/dashboard/metric-card.svelte+++ b/frontend/src/lib/components/dashboard/metric-card.svelte@@ -45,10 +45,10 @@return Math.round(value).toString();}- // Memory (MB)+ // Memory (MB) - convert to GB for large valuesif (unit === 'MB') {- if (value >= 1024) return (value / 1024).toFixed(1);- return Math.round(value).toString();+ if (value >= 1024) return (value / 1024).toFixed(1) + ' GB';+ return Math.round(value).toString() + ' MB';}// Default: round to 1 decimal@@ -162,7 +162,7 @@{metric.name}</Card.Title><div class="text-2xl font-bold">- {formattedValue}{#if metric.unit}<span class="ml-1 text-lg text-muted-foreground"+ {formattedValue}{#if metric.unit && metric.unit !== 'MB'}<span class="ml-1 text-lg text-muted-foreground">{metric.unit}</span>{/if}</div>diff --git a/frontend/src/lib/components/ui/loading-circle/index.ts b/frontend/src/lib/components/ui/loading-circle/index.tsnew file mode 100644index 00000000..fbd76ac5--- /dev/null+++ b/frontend/src/lib/components/ui/loading-circle/index.ts@@ -0,0 +1,3 @@+import LoadingCircle from "./loading-circle.svelte";++export { LoadingCircle };diff --git a/frontend/src/lib/components/ui/loading-circle/loading-circle.svelte b/frontend/src/lib/components/ui/loading-circle/loading-circle.sveltenew file mode 100644index 00000000..f5d73349--- /dev/null+++ b/frontend/src/lib/components/ui/loading-circle/loading-circle.svelte@@ -0,0 +1,94 @@+<script lang="ts" module>+ import { tv, type VariantProps } from "tailwind-variants";++ export const loadingCircleVariants = tv({+ base: "text-muted-foreground dark:text-white",+ variants: {+ size: {+ sm: "h-4 w-4",+ default: "h-6 w-6",+ md: "h-8 w-8",+ lg: "h-12 w-12"+ }+ },+ defaultVariants: {+ size: "default"+ }+ });++ export type LoadingCircleSize = VariantProps<typeof loadingCircleVariants>["size"];+</script>++<script lang="ts">+ import { cn } from "$lib/utils.js";++ let {+ class: className,+ size = "default"+ }: {+ class?: string;+ size?: LoadingCircleSize;+ } = $props();+</script>++<svg+ xmlns="http://www.w3.org/2000/svg"+ viewBox="0 0 500 500"+ data-slot="loading-circle"+ class={cn(loadingCircleVariants({ size }), className)}+>+ <g fill="none" stroke="currentColor" stroke-linecap="round" stroke-width="31.25">+ <g class="outer-ring">+ <path+ d="M250 41.67c115.06 0 208.33 93.27 208.33 208.33c0 37.94-10.15 73.54-27.88 104.17M104.17 101.23A207.71 207.71 0 0 0 41.67 250c0 115.06 93.27 208.33 208.33 208.33c37.94 0 73.54-10.15 104.17-27.88"+ />+ </g>+ <g class="middle-ring">+ <path+ d="M104.17 250c0 30.98 9.67 59.71 26.15 83.33M250 104.17a145.83 145.83 0 1 1-62.5 277.63"+ />+ </g>+ <g class="inner-ring">+ <path d="M250 333.33a83.33 83.33 0 0 0 0-166.67" />+ </g>+ </g>+</svg>++<style>+ @keyframes spin-slow {+ from {+ transform: rotate(0deg);+ }+ to {+ transform: rotate(360deg);+ }+ }+ @keyframes spin-medium {+ from {+ transform: rotate(0deg);+ }+ to {+ transform: rotate(-360deg);+ }+ }+ @keyframes spin-fast {+ from {+ transform: rotate(0deg);+ }+ to {+ transform: rotate(360deg);+ }+ }+ .outer-ring {+ animation: spin-slow 3s linear infinite;+ transform-origin: 250px 250px;+ }+ .middle-ring {+ animation: spin-medium 2s linear infinite;+ transform-origin: 250px 250px;+ }+ .inner-ring {+ animation: spin-fast 1.2s linear infinite;+ transform-origin: 250px 250px;+ }+</style>diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelteindex 00f46703..fa15e505 100644--- a/frontend/src/routes/+page.svelte+++ b/frontend/src/routes/+page.svelte@@ -1,7 +1,7 @@<script lang="ts">import { onMount } from 'svelte';import { goto } from '$app/navigation';- import { Skeleton } from '$lib/components/ui/skeleton';+ import { LoadingCircle } from '$lib/components/ui/loading-circle';import * as Table from '$lib/components/ui/table';import * as Tooltip from '$lib/components/ui/tooltip';import { ArrowRight, Info, Gauge, Bug, CircleQuestionMark } from 'lucide-svelte';@@ -130,7 +130,11 @@/>{/if}- {#if !error}+ {#if loading}+ <div class="flex justify-center items-center py-20">+ <LoadingCircle size="lg" />+ </div>+ {:else if !error}<div class="space-y-8"><!-- Endpoints --><div>@@ -150,7 +154,7 @@</div><div class="rounded-md border overflow-hidden"><Table.Root>- {#if loading || (data?.worstEndpoints && data.worstEndpoints.length > 0)}+ {#if data?.worstEndpoints && data.worstEndpoints.length > 0}<Table.Header><Table.Row class="hover:bg-transparent"><Table.Head class="h-10 text-sm">@@ -220,58 +224,48 @@</Table.Head></Table.Row></Table.Header>- {/if}<Table.Body>- {#if loading}- {#each Array(4) as _}- <Table.Row>- <Table.Cell class="py-3"><Skeleton class="h-4 w-[150px]" /></Table.Cell>- <Table.Cell class="py-3 text-right"><Skeleton class="h-4 w-[35px] ml-auto" /></Table.Cell>- <Table.Cell class="py-3 text-right"><Skeleton class="h-4 w-[45px] ml-auto" /></Table.Cell>- <Table.Cell class="py-3 text-right"><Skeleton class="h-4 w-[45px] ml-auto" /></Table.Cell>- <Table.Cell class="py-3 text-right"><Skeleton class="h-4 w-[45px] ml-auto" /></Table.Cell>- </Table.Row>- {/each}- {:else if data?.worstEndpoints && data.worstEndpoints.length > 0}- {#each data.worstEndpoints as endpoint}- <Table.Row- class="cursor-pointer hover:bg-muted/50"- onclick={() => goto(`/transactions/${encodeURIComponent(endpoint.endpoint)}`)}- >- <Table.Cell class="py-3 font-mono text-sm truncate max-w-[300px]" title={endpoint.endpoint}>- {endpoint.endpoint}- </Table.Cell>- <Table.Cell class="py-3 text-right tabular-nums">- {endpoint.count.toLocaleString()}- </Table.Cell>- <Table.Cell class="py-3 text-right font-mono text-sm tabular-nums">- {formatDuration(endpoint.p50Duration)}- </Table.Cell>- <Table.Cell class="py-3 text-right font-mono text-sm tabular-nums">- {formatDuration(endpoint.p95Duration)}- </Table.Cell>- {@const impact = getImpactIndicator(endpoint.count, endpoint.p50Duration, endpoint.p95Duration)}- <Table.Cell class="py-3 text-right font-mono text-sm tabular-nums">- <span class={impact.class}>{impact.text}</span>- </Table.Cell>- </Table.Row>- {/each}+ {#each data.worstEndpoints as endpoint}<Table.Row- class="cursor-pointer bg-muted/50 hover:bg-muted"- onclick={() => goto('/transactions')}+ class="cursor-pointer hover:bg-muted/50"+ onclick={() => goto(`/transactions/${encodeURIComponent(endpoint.endpoint)}`)}>- <Table.Cell colspan={5} class="py-2 text-center text-sm text-muted-foreground">- View all transactions <ArrowRight class="inline h-3.5 w-3.5" />+ <Table.Cell class="py-3 font-mono text-sm truncate max-w-[300px]" title={endpoint.endpoint}>+ {endpoint.endpoint}</Table.Cell>- </Table.Row>- {:else}- <Table.Row>- <Table.Cell colspan={5} class="h-24 text-center text-muted-foreground">- No transaction data received yet+ <Table.Cell class="py-3 text-right tabular-nums">+ {endpoint.count.toLocaleString()}+ </Table.Cell>+ <Table.Cell class="py-3 text-right font-mono text-sm tabular-nums">+ {formatDuration(endpoint.p50Duration)}+ </Table.Cell>+ <Table.Cell class="py-3 text-right font-mono text-sm tabular-nums">+ {formatDuration(endpoint.p95Duration)}+ </Table.Cell>+ {@const impact = getImpactIndicator(endpoint.count, endpoint.p50Duration, endpoint.p95Duration)}+ <Table.Cell class="py-3 text-right font-mono text-sm tabular-nums">+ <span class={impact.class}>{impact.text}</span></Table.Cell></Table.Row>- {/if}+ {/each}+ <Table.Row+ class="cursor-pointer bg-muted/50 hover:bg-muted"+ onclick={() => goto('/transactions')}+ >+ <Table.Cell colspan={5} class="py-2 text-center text-sm text-muted-foreground">+ View all transactions <ArrowRight class="inline h-3.5 w-3.5" />+ </Table.Cell>+ </Table.Row>+ </Table.Body>+ {:else}+ <Table.Body>+ <Table.Row>+ <Table.Cell colspan={5} class="h-24 text-center text-muted-foreground">+ No transaction data received yet+ </Table.Cell>+ </Table.Row></Table.Body>+ {/if}</Table.Root></div></div>@@ -294,7 +288,7 @@</div><div class="rounded-md border overflow-hidden"><Table.Root>- {#if loading || (data?.recentIssues && data.recentIssues.length > 0)}+ {#if data?.recentIssues && data.recentIssues.length > 0}<Table.Header><Table.Row class="hover:bg-transparent"><Table.Head class="h-10 text-sm">@@ -338,49 +332,41 @@</Table.Head></Table.Row></Table.Header>- {/if}<Table.Body>- {#if loading}- {#each Array(4) as _}- <Table.Row>- <Table.Cell class="py-3"><Skeleton class="h-4 w-[200px]" /></Table.Cell>- <Table.Cell class="py-3 text-right"><Skeleton class="h-4 w-[30px] ml-auto" /></Table.Cell>- <Table.Cell class="py-3 text-right"><Skeleton class="h-4 w-[35px] ml-auto" /></Table.Cell>- </Table.Row>- {/each}- {:else if data?.recentIssues && data.recentIssues.length > 0}- {#each data.recentIssues as issue}- <Table.Row- class="cursor-pointer hover:bg-muted/50"- onclick={() => goto(`/issues/${issue.exceptionHash}`)}- >- <Table.Cell class="py-3 font-mono text-sm" title={issue.stackTrace}>- {truncateStackTrace(issue.stackTrace)}- </Table.Cell>- <Table.Cell class="py-3 text-right font-medium tabular-nums">- {issue.count}- </Table.Cell>- <Table.Cell class="py-3 text-right text-muted-foreground text-sm tabular-nums">- {formatRelativeTime(issue.lastSeen)}- </Table.Cell>- </Table.Row>- {/each}+ {#each data.recentIssues as issue}<Table.Row- class="cursor-pointer bg-muted/50 hover:bg-muted"- onclick={() => goto('/issues')}+ class="cursor-pointer hover:bg-muted/50"+ onclick={() => goto(`/issues/${issue.exceptionHash}`)}>- <Table.Cell colspan={3} class="py-2 text-center text-sm text-muted-foreground">- View all issues <ArrowRight class="inline h-3.5 w-3.5" />+ <Table.Cell class="py-3 font-mono text-sm" title={issue.stackTrace}>+ {truncateStackTrace(issue.stackTrace)}</Table.Cell>- </Table.Row>- {:else}- <Table.Row>- <Table.Cell colspan={3} class="h-24 text-center text-muted-foreground">- No issues in the last 24 hours+ <Table.Cell class="py-3 text-right font-medium tabular-nums">+ {issue.count}+ </Table.Cell>+ <Table.Cell class="py-3 text-right text-muted-foreground text-sm tabular-nums">+ {formatRelativeTime(issue.lastSeen)}</Table.Cell></Table.Row>- {/if}+ {/each}+ <Table.Row+ class="cursor-pointer bg-muted/50 hover:bg-muted"+ onclick={() => goto('/issues')}+ >+ <Table.Cell colspan={3} class="py-2 text-center text-sm text-muted-foreground">+ View all issues <ArrowRight class="inline h-3.5 w-3.5" />+ </Table.Cell>+ </Table.Row></Table.Body>+ {:else}+ <Table.Body>+ <Table.Row>+ <Table.Cell colspan={3} class="h-24 text-center text-muted-foreground">+ No issues in the last 24 hours+ </Table.Cell>+ </Table.Row>+ </Table.Body>+ {/if}</Table.Root></div></div>diff --git a/frontend/src/routes/issues/+page.svelte b/frontend/src/routes/issues/+page.svelteindex d6fddfe5..36a189fa 100644--- a/frontend/src/routes/issues/+page.svelte+++ b/frontend/src/routes/issues/+page.svelte@@ -6,7 +6,7 @@import { Input } from "$lib/components/ui/input";import { Button } from "$lib/components/ui/button";import * as Select from "$lib/components/ui/select";- import { Skeleton } from "$lib/components/ui/skeleton";+ import { LoadingCircle } from "$lib/components/ui/loading-circle";import { Checkbox } from "$lib/components/ui/checkbox";import { projectsState } from '$lib/state/projects.svelte';import IssueTrendChart from '$lib/components/issue-trend-chart.svelte';@@ -237,7 +237,33 @@<div class="rounded-md border overflow-hidden"><Table.Root>- {#if loading || exceptions.length > 0}+ {#if loading}+ <Table.Body>+ <Table.Row>+ <Table.Cell colspan={5} class="h-48">+ <div class="flex justify-center items-center h-full">+ <LoadingCircle size="lg" />+ </div>+ </Table.Cell>+ </Table.Row>+ </Table.Body>+ {:else if error}+ <Table.Body>+ <Table.Row>+ <Table.Cell colspan={5} class="h-24 text-center text-red-500">+ {error}+ </Table.Cell>+ </Table.Row>+ </Table.Body>+ {:else if exceptions.length === 0}+ <Table.Body>+ <Table.Row>+ <Table.Cell colspan={5} class="h-24 text-center text-muted-foreground">+ No issues found.+ </Table.Cell>+ </Table.Row>+ </Table.Body>+ {:else}<Table.Header><Table.Row><Table.Head class="w-[40px] pl-4">@@ -253,69 +279,45 @@<Table.Head class="w-[180px]">Last Seen</Table.Head></Table.Row></Table.Header>- {/if}<Table.Body>- {#if loading}- {#each Array(5) as _}- <Table.Row>- <Table.Cell class="pl-4"><Skeleton class="h-4 w-4" /></Table.Cell>- <Table.Cell><Skeleton class="h-4 w-[250px]" /></Table.Cell>- <Table.Cell><Skeleton class="h-7 w-[176px]" /></Table.Cell>- <Table.Cell><Skeleton class="h-4 w-[40px] ml-auto" /></Table.Cell>- <Table.Cell><Skeleton class="h-4 w-[120px]" /></Table.Cell>- </Table.Row>- {/each}- {:else if error}- <Table.Row>- <Table.Cell colspan={5} class="h-24 text-center text-red-500">- {error}+ {#each exceptions as exception (exception.exceptionHash)}+ <Table.Row+ class="cursor-pointer hover:bg-muted/50 group"+ data-state={isSelected(exception.exceptionHash) ? "selected" : undefined}+ >+ <Table.Cell class="pl-4" onclick={(e) => e.stopPropagation()}>+ <Checkbox+ checked={isSelected(exception.exceptionHash)}+ onCheckedChange={() => toggleSelect(exception.exceptionHash)}+ aria-label="Select row"+ /></Table.Cell>- </Table.Row>- {:else if exceptions.length === 0}- <Table.Row>- <Table.Cell colspan={5} class="h-24 text-center text-muted-foreground">- No issues found.+ <Table.Cell+ class="font-mono text-sm truncate max-w-[400px]"+ title={exception.stackTrace}+ onclick={() => goto(`/issues/${exception.exceptionHash}`)}+ >+ <span class="text-foreground">{exception.stackTrace.split('\n')[0]}</span></Table.Cell>- </Table.Row>- {:else}- {#each exceptions as exception (exception.exceptionHash)}- <Table.Row- class="cursor-pointer hover:bg-muted/50 group"- data-state={isSelected(exception.exceptionHash) ? "selected" : undefined}+ <Table.Cell onclick={() => goto(`/issues/${exception.exceptionHash}`)}>+ <IssueTrendChart trend={exception.hourlyTrend || []} />+ </Table.Cell>+ <Table.Cell+ class="text-right tabular-nums font-medium"+ onclick={() => goto(`/issues/${exception.exceptionHash}`)}>- <Table.Cell class="pl-4" onclick={(e) => e.stopPropagation()}>- <Checkbox- checked={isSelected(exception.exceptionHash)}- onCheckedChange={() => toggleSelect(exception.exceptionHash)}- aria-label="Select row"- />- </Table.Cell>- <Table.Cell- class="font-mono text-sm truncate max-w-[400px]"- title={exception.stackTrace}- onclick={() => goto(`/issues/${exception.exceptionHash}`)}- >- <span class="text-foreground">{exception.stackTrace.split('\n')[0]}</span>- </Table.Cell>- <Table.Cell onclick={() => goto(`/issues/${exception.exceptionHash}`)}>- <IssueTrendChart trend={exception.hourlyTrend || []} />- </Table.Cell>- <Table.Cell- class="text-right tabular-nums font-medium"- onclick={() => goto(`/issues/${exception.exceptionHash}`)}- >- {exception.count.toLocaleString()}- </Table.Cell>- <Table.Cell- class="text-muted-foreground"- onclick={() => goto(`/issues/${exception.exceptionHash}`)}- >- {new Date(exception.lastSeen).toLocaleString()}- </Table.Cell>- </Table.Row>- {/each}- {/if}+ {exception.count.toLocaleString()}+ </Table.Cell>+ <Table.Cell+ class="text-muted-foreground"+ onclick={() => goto(`/issues/${exception.exceptionHash}`)}+ >+ {new Date(exception.lastSeen).toLocaleString()}+ </Table.Cell>+ </Table.Row>+ {/each}</Table.Body>+ {/if}</Table.Root></div>diff --git a/frontend/src/routes/metrics/+page.svelte b/frontend/src/routes/metrics/+page.svelteindex 07c26c2a..9f3536bb 100644--- a/frontend/src/routes/metrics/+page.svelte+++ b/frontend/src/routes/metrics/+page.svelte@@ -2,7 +2,7 @@import { onMount } from 'svelte';import { browser } from '$app/environment';import { Button } from '$lib/components/ui/button';- import { Skeleton } from '$lib/components/ui/skeleton';+ import { LoadingCircle } from '$lib/components/ui/loading-circle';import { RefreshCw } from 'lucide-svelte';import MetricCard from '$lib/components/dashboard/metric-card.svelte';import type { DashboardData, DashboardMetric } from '$lib/types/dashboard';@@ -275,19 +275,9 @@{#if !error}<div class="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4">{#if loading}- {#each Array(11) as _}- <Card>- <CardContent class="flex gap-3 flex-col">- <div class="flex items-center justify-between">- <Skeleton class="h-4 w-24" />- <Skeleton class="h-2 w-2 rounded-full" />- </div>- <Skeleton class="h-8 w-32" />- <Skeleton class="h-16 w-full" />- <Skeleton class="h-3 w-28" />- </CardContent>- </Card>- {/each}+ <div class="col-span-full flex justify-center items-center py-20">+ <LoadingCircle size="lg" />+ </div>{:else if dashboardData}{#each dashboardData.metrics as metric (metric.id)}<MetricCard {metric} timeDomain={sharedTimeDomain} onRangeSelect={handleChartRangeSelect} />diff --git a/frontend/src/routes/transactions/+page.svelte b/frontend/src/routes/transactions/+page.svelteindex 3fd77497..d0ee8bf3 100644--- a/frontend/src/routes/transactions/+page.svelte+++ b/frontend/src/routes/transactions/+page.svelte@@ -4,7 +4,7 @@import { api } from '$lib/api';import * as Table from "$lib/components/ui/table";import { Button } from "$lib/components/ui/button";- import { Skeleton } from "$lib/components/ui/skeleton";+ import { LoadingCircle } from "$lib/components/ui/loading-circle";import * as Select from "$lib/components/ui/select";import { ArrowUpDown, ArrowDown, ArrowUp } from "@lucide/svelte";import { TimeRangePicker } from "$lib/components/ui/time-range-picker";@@ -198,7 +198,33 @@<!-- Endpoints Table --><div class="rounded-md border overflow-hidden"><Table.Root>- {#if loading || endpoints.length > 0}+ {#if loading}+ <Table.Body>+ <Table.Row>+ <Table.Cell colspan={5} class="h-48">+ <div class="flex justify-center items-center h-full">+ <LoadingCircle size="lg" />+ </div>+ </Table.Cell>+ </Table.Row>+ </Table.Body>+ {:else if error}+ <Table.Body>+ <Table.Row>+ <Table.Cell colspan={5} class="h-24 text-center text-red-500">+ {error}+ </Table.Cell>+ </Table.Row>+ </Table.Body>+ {:else if endpoints.length === 0}+ <Table.Body>+ <Table.Row>+ <Table.Cell colspan={5} class="h-24 text-center text-muted-foreground">+ No transaction data received yet+ </Table.Cell>+ </Table.Row>+ </Table.Body>+ {:else}<Table.Header><Table.Row><Table.Head>Endpoint</Table.Head>@@ -280,56 +306,32 @@</Table.Head></Table.Row></Table.Header>- {/if}<Table.Body>- {#if loading}- {#each Array(5) as _}- <Table.Row>- <Table.Cell><Skeleton class="h-4 w-[250px]" /></Table.Cell>- <Table.Cell><Skeleton class="h-4 w-[50px]" /></Table.Cell>- <Table.Cell><Skeleton class="h-4 w-[60px]" /></Table.Cell>- <Table.Cell><Skeleton class="h-4 w-[60px]" /></Table.Cell>- <Table.Cell><Skeleton class="h-4 w-[30px]" /></Table.Cell>- </Table.Row>- {/each}- {:else if error}- <Table.Row>- <Table.Cell colspan={5} class="h-24 text-center text-red-500">- {error}+ {#each endpoints as endpoint}+ {@const impact = getImpactIndicator(endpoint.count, endpoint.p50Duration, endpoint.p95Duration)}+ <Table.Row+ class="cursor-pointer hover:bg-muted/50"+ onclick={() => navigateToEndpoint(endpoint.endpoint)}+ >+ <Table.Cell class="font-mono text-sm">+ {endpoint.endpoint}</Table.Cell>- </Table.Row>- {:else if endpoints.length === 0}- <Table.Row>- <Table.Cell colspan={5} class="h-24 text-center text-muted-foreground">- No transaction data received yet+ <Table.Cell class="tabular-nums">+ {formatCount(endpoint.count)}+ </Table.Cell>+ <Table.Cell class="font-mono text-sm tabular-nums">+ {formatDuration(endpoint.p50Duration)}+ </Table.Cell>+ <Table.Cell class="font-mono text-sm tabular-nums">+ {formatDuration(endpoint.p95Duration)}+ </Table.Cell>+ <Table.Cell class="font-mono text-sm tabular-nums">+ <span class={impact.class}>{impact.text}</span></Table.Cell></Table.Row>- {:else}- {#each endpoints as endpoint}- {@const impact = getImpactIndicator(endpoint.count, endpoint.p50Duration, endpoint.p95Duration)}- <Table.Row- class="cursor-pointer hover:bg-muted/50"- onclick={() => navigateToEndpoint(endpoint.endpoint)}- >- <Table.Cell class="font-mono text-sm">- {endpoint.endpoint}- </Table.Cell>- <Table.Cell class="tabular-nums">- {formatCount(endpoint.count)}- </Table.Cell>- <Table.Cell class="font-mono text-sm tabular-nums">- {formatDuration(endpoint.p50Duration)}- </Table.Cell>- <Table.Cell class="font-mono text-sm tabular-nums">- {formatDuration(endpoint.p95Duration)}- </Table.Cell>- <Table.Cell class="font-mono text-sm tabular-nums">- <span class={impact.class}>{impact.text}</span>- </Table.Cell>- </Table.Row>- {/each}- {/if}+ {/each}</Table.Body>+ {/if}</Table.Root></div>