@debugkit/dashboard 0.4.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +3 -0
- package/dist/client/assets/_authed-BMdIkvB6.js +7 -0
- package/dist/client/assets/_authed-Rg-Gabby.js +1 -0
- package/dist/client/assets/{charts-C76vsG2N.js → charts-QIIL2Fv7.js} +18 -18
- package/dist/client/assets/index-CMjwqklY.js +10 -0
- package/dist/client/assets/invite._token-CDogkC9p.js +1 -0
- package/dist/client/assets/issues._fingerprint-DLe_lV5d.js +1 -0
- package/dist/client/assets/login-BG9v4zhc.js +1 -0
- package/dist/client/assets/preload-helper-Dscj_TcA.js +3 -0
- package/dist/client/assets/settings-Ce1uqKl0.js +1 -0
- package/dist/client/assets/styles-DztngwT9.css +2 -0
- package/dist/client/assets/team-TUMAZ4jv.js +1 -0
- package/dist/client/assets/ui-C0HGOza2.js +1 -0
- package/dist/server/assets/_authed-DDQ5yYfy.js +73 -0
- package/dist/server/assets/{_authed-ClbGOSDJ.js → _authed-Dray_9Ct.js} +296 -70
- package/dist/server/assets/_tanstack-start-manifest_v-BItoYCqL.js +61 -0
- package/dist/server/assets/{charts-CNlV7Pga.js → charts-DzTVqJ8z.js} +21 -4
- package/dist/server/assets/{demo-DTdlXNgj.js → demo-BsMMDk_F.js} +87 -10
- package/dist/server/assets/dynamodb-Zkk1-mgz.js +445 -0
- package/dist/server/assets/firestore-C52q_vwM.js +237 -0
- package/dist/server/assets/fns-DwGaMi8S.js +107 -0
- package/dist/server/assets/fns-mbUIXXep.js +529 -0
- package/dist/server/assets/invite._token-BWiwnST7.js +136 -0
- package/dist/server/assets/{issues._fingerprint-D78dy5os.js → issues._fingerprint-D9vjIk3M.js} +159 -17
- package/dist/server/assets/{login-h3B5Vdhl.js → login-BXi46U4B.js} +3 -3
- package/dist/server/assets/{queries-DIVV-5j6.js → memory-BssaqdZm.js} +234 -504
- package/dist/server/assets/queries-BJxX3Kjp.js +1669 -0
- package/dist/server/assets/range-picker-0zbSGr3Z.js +106 -0
- package/dist/server/assets/rolldown-runtime-D8jQpDG7.js +12 -0
- package/dist/server/assets/{router-DqTf7XfT.js → router-m6Hpq6Ep.js} +114 -51
- package/dist/server/assets/settings-ByFLIJce.js +371 -0
- package/dist/server/assets/src-D83GYTrp.js +9 -0
- package/dist/server/assets/team-CifrrNkf.js +255 -0
- package/dist/server/assets/{ui-Lv-KcOoP.js → ui-BJokJdYa.js} +25 -3
- package/dist/server/server.js +60 -8
- package/handler.mjs +95 -0
- package/lambda.mjs +61 -0
- package/package.json +16 -7
- package/server.mjs +4 -39
- package/dist/client/assets/_authed-Bi62GTX3.js +0 -7
- package/dist/client/assets/_authed-mWCAMokt.js +0 -1
- package/dist/client/assets/index-D7uhDdvA.js +0 -12
- package/dist/client/assets/issues._fingerprint-fVGLnT37.js +0 -1
- package/dist/client/assets/login-MqvT094Y.js +0 -1
- package/dist/client/assets/styles-CZZRuG1z.css +0 -2
- package/dist/client/assets/ui-Bj6uJIr8.js +0 -1
- package/dist/server/assets/_authed-BaehIntL.js +0 -40
- package/dist/server/assets/_tanstack-start-manifest_v-eNUCOzFz.js +0 -40
- package/dist/server/assets/dynamodb-DejcakaF.js +0 -187
- package/dist/server/assets/firestore-BH-gx9no.js +0 -112
- package/dist/server/assets/fns-CgB12FUN.js +0 -31
- package/dist/server/assets/fns-Yg8sT1Cb.js +0 -87
- package/dist/server/assets/memory-4DwW5cTO.js +0 -59
- package/dist/server/assets/rollups-JXbazRNh.js +0 -22
- package/dist/server/assets/src-D5jyi_C4.js +0 -235
|
@@ -1,37 +1,61 @@
|
|
|
1
|
-
import { r as TrendChart, t as FlowChart } from "./charts-
|
|
2
|
-
import { a as
|
|
3
|
-
import {
|
|
1
|
+
import { r as TrendChart, t as FlowChart } from "./charts-DzTVqJ8z.js";
|
|
2
|
+
import { a as SeverityBadge, c as timeAgo, n as DataTable, o as ShareBars, r as IssueLabels, s as Stat, t as Card } from "./ui-BJokJdYa.js";
|
|
3
|
+
import { n as RetentionNote, t as RangePicker } from "./range-picker-0zbSGr3Z.js";
|
|
4
|
+
import { o as Route } from "./router-m6Hpq6Ep.js";
|
|
4
5
|
import { useEffect } from "react";
|
|
5
6
|
import { Link, useNavigate, useRouter } from "@tanstack/react-router";
|
|
6
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
8
|
// src/routes/_authed/index.tsx?tsr-split=component
|
|
8
9
|
function Overview() {
|
|
9
10
|
const summary = Route.useLoaderData();
|
|
10
|
-
const
|
|
11
|
+
const search = Route.useSearch();
|
|
12
|
+
const { flow } = search;
|
|
11
13
|
const navigate = useNavigate({ from: Route.fullPath });
|
|
12
14
|
if (!summary) return /* @__PURE__ */ jsx(EmptyState, {});
|
|
13
|
-
const { totals } = summary;
|
|
14
|
-
const
|
|
15
|
+
const { totals, range } = summary;
|
|
16
|
+
const span = range.preset === "custom" ? "range" : range.preset;
|
|
17
|
+
const statusFilter = search.status ?? "open";
|
|
18
|
+
const byStatus = summary.issues.filter((i) => statusFilter === "all" ? true : statusFilter === "open" ? i.status === "open" || i.status === "regressed" : i.status === statusFilter);
|
|
19
|
+
const issues = flow ? byStatus.filter((i) => (i.flow ?? "untagged") === flow) : byStatus;
|
|
20
|
+
const countFor = (st) => summary.issues.filter((i) => st === "open" ? i.status === "open" || i.status === "regressed" : i.status === st).length;
|
|
15
21
|
const change = totals.changePct;
|
|
16
22
|
return /* @__PURE__ */ jsxs("main", {
|
|
17
23
|
className: "mx-auto max-w-7xl space-y-5 px-4 py-6 sm:px-6",
|
|
18
24
|
children: [
|
|
19
25
|
/* @__PURE__ */ jsxs("div", {
|
|
20
26
|
className: "flex flex-wrap items-end justify-between gap-3",
|
|
21
|
-
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("p", {
|
|
22
28
|
className: "text-xs uppercase tracking-wide text-muted",
|
|
23
|
-
children: "Overview ·
|
|
29
|
+
children: ["Overview · ", range.label]
|
|
24
30
|
}), /* @__PURE__ */ jsxs("h1", {
|
|
25
31
|
className: "text-2xl font-semibold tracking-tight",
|
|
26
32
|
children: ["What's going wrong in ", summary.app]
|
|
27
|
-
})] }),
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
})] }), /* @__PURE__ */ jsxs("div", {
|
|
34
|
+
className: "flex flex-wrap items-center gap-2",
|
|
35
|
+
children: [/* @__PURE__ */ jsx(RangePicker, {
|
|
36
|
+
value: range,
|
|
37
|
+
today: summary.generatedAt.slice(0, 10),
|
|
38
|
+
onChange: (r) => navigate({ search: (s) => ({
|
|
39
|
+
...s,
|
|
40
|
+
...r
|
|
41
|
+
}) })
|
|
42
|
+
}, `${range.preset}${range.from}${range.to}`), summary.apps.length > 1 && /* @__PURE__ */ jsx("select", {
|
|
43
|
+
"aria-label": "App",
|
|
44
|
+
value: summary.app,
|
|
45
|
+
onChange: (e) => navigate({ search: (s) => ({
|
|
46
|
+
...s,
|
|
47
|
+
app: e.target.value,
|
|
48
|
+
flow: void 0
|
|
49
|
+
}) }),
|
|
50
|
+
className: "rounded-md border border-line bg-panel px-2 py-1.5 text-sm",
|
|
51
|
+
children: summary.apps.map((a) => /* @__PURE__ */ jsx("option", { children: a }, a))
|
|
52
|
+
})]
|
|
33
53
|
})]
|
|
34
54
|
}),
|
|
55
|
+
/* @__PURE__ */ jsx(RetentionNote, {
|
|
56
|
+
rangeFrom: range.from,
|
|
57
|
+
retention: summary.retention
|
|
58
|
+
}),
|
|
35
59
|
/* @__PURE__ */ jsx("section", {
|
|
36
60
|
"aria-label": "Summary",
|
|
37
61
|
className: "rounded-xl border border-line bg-panel p-4 sm:p-5",
|
|
@@ -47,10 +71,10 @@ function Overview() {
|
|
|
47
71
|
className: "grid grid-cols-2 gap-3 lg:grid-cols-4",
|
|
48
72
|
children: [
|
|
49
73
|
/* @__PURE__ */ jsx(Stat, {
|
|
50
|
-
label:
|
|
51
|
-
value: totals.
|
|
74
|
+
label: `Errors (${span})`,
|
|
75
|
+
value: totals.errorsRange.toLocaleString(),
|
|
52
76
|
tone: totals.criticalIssues ? "critical" : void 0,
|
|
53
|
-
hint: change === null ? "
|
|
77
|
+
hint: change === null ? "not enough earlier data to compare" : change > 500 ? `▲ from ${totals.errorsPrev.toLocaleString()} in the previous ${range.span}` : `${change > 0 ? "▲" : change < 0 ? "▼" : "•"} ${Math.abs(change)}% vs previous ${range.span}`
|
|
54
78
|
}),
|
|
55
79
|
/* @__PURE__ */ jsx(Stat, {
|
|
56
80
|
label: "Critical issues",
|
|
@@ -59,25 +83,26 @@ function Overview() {
|
|
|
59
83
|
hint: "≥ threshold occurrences in 24h"
|
|
60
84
|
}),
|
|
61
85
|
/* @__PURE__ */ jsx(Stat, {
|
|
62
|
-
label:
|
|
63
|
-
value:
|
|
64
|
-
|
|
86
|
+
label: `Crash-free users (${span})`,
|
|
87
|
+
value: asPct(summary.health.crashFreeUsersRate),
|
|
88
|
+
tone: summary.health.crashFreeUsersRate !== null && summary.health.crashFreeUsersRate < .99 ? "high" : void 0,
|
|
89
|
+
hint: `${summary.health.users.toLocaleString()} users · ${summary.health.crashedUsers.toLocaleString()} crashed`
|
|
65
90
|
}),
|
|
66
91
|
/* @__PURE__ */ jsx(Stat, {
|
|
67
|
-
label:
|
|
92
|
+
label: `Crash-free sessions (${span})`,
|
|
68
93
|
value: asPct(summary.health.crashFreeRate),
|
|
69
94
|
tone: summary.health.crashFreeRate !== null && summary.health.crashFreeRate < .99 ? "high" : void 0,
|
|
70
|
-
hint: `${summary.health.
|
|
95
|
+
hint: `${summary.health.sessionsRange.toLocaleString()} sessions · ${totals.activeIssues} active issues`
|
|
71
96
|
})
|
|
72
97
|
]
|
|
73
98
|
}),
|
|
74
99
|
/* @__PURE__ */ jsxs("div", {
|
|
75
100
|
className: "grid gap-5 lg:grid-cols-5",
|
|
76
101
|
children: [/* @__PURE__ */ jsx("div", {
|
|
77
|
-
className: "lg:col-span-3",
|
|
102
|
+
className: "min-w-0 lg:col-span-3",
|
|
78
103
|
children: /* @__PURE__ */ jsxs(Card, {
|
|
79
104
|
title: "Where the app is failing",
|
|
80
|
-
subtitle:
|
|
105
|
+
subtitle: `Errors in ${range.label} by flow, coloured by worst severity. Click a bar to filter issues.`,
|
|
81
106
|
children: [/* @__PURE__ */ jsx(FlowChart, {
|
|
82
107
|
data: summary.flows,
|
|
83
108
|
onSelect: (f) => navigate({ search: (s) => ({
|
|
@@ -89,37 +114,54 @@ function Overview() {
|
|
|
89
114
|
"Flow",
|
|
90
115
|
"Severity",
|
|
91
116
|
"Errors 24h",
|
|
92
|
-
|
|
117
|
+
`Errors (${span})`,
|
|
93
118
|
"Issues",
|
|
94
|
-
|
|
119
|
+
`Failure rate (${span})`
|
|
95
120
|
],
|
|
96
121
|
rows: summary.flows.map((f) => [
|
|
97
|
-
f.flow,
|
|
122
|
+
f.critical ? `${f.flow} (critical)` : f.flow,
|
|
98
123
|
f.severity,
|
|
99
124
|
f.errors24h,
|
|
100
|
-
f.
|
|
125
|
+
f.errorsRange,
|
|
101
126
|
f.issues,
|
|
102
127
|
f.failureRate === null ? "—" : `${Math.round(f.failureRate * 100)}%`
|
|
103
128
|
])
|
|
104
129
|
})]
|
|
105
130
|
})
|
|
106
131
|
}), /* @__PURE__ */ jsx("div", {
|
|
107
|
-
className: "lg:col-span-2",
|
|
132
|
+
className: "min-w-0 lg:col-span-2",
|
|
108
133
|
children: /* @__PURE__ */ jsxs(Card, {
|
|
109
134
|
title: "Error trend",
|
|
110
|
-
subtitle:
|
|
111
|
-
children: [
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
135
|
+
subtitle: `Errors per ${range.granularity}, ${range.label} (UTC)`,
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ jsx(TrendChart, {
|
|
138
|
+
data: summary.trend,
|
|
139
|
+
markers: summary.releases.map((r) => ({
|
|
140
|
+
day: r.firstDay,
|
|
141
|
+
label: r.release
|
|
142
|
+
}))
|
|
143
|
+
}),
|
|
144
|
+
summary.releases.length > 0 && /* @__PURE__ */ jsxs("p", {
|
|
145
|
+
className: "mt-2 text-xs text-muted",
|
|
146
|
+
children: [
|
|
147
|
+
"Dashed lines: a release's first sessions (",
|
|
148
|
+
summary.releases.map((r) => r.release).join(", "),
|
|
149
|
+
")."
|
|
150
|
+
]
|
|
151
|
+
}),
|
|
152
|
+
/* @__PURE__ */ jsx(DataTable, {
|
|
153
|
+
columns: [
|
|
154
|
+
"Day",
|
|
155
|
+
"Errors",
|
|
156
|
+
"Events"
|
|
157
|
+
],
|
|
158
|
+
rows: summary.trend.map((d) => [
|
|
159
|
+
d.day,
|
|
160
|
+
d.errors,
|
|
161
|
+
d.events
|
|
162
|
+
])
|
|
163
|
+
})
|
|
164
|
+
]
|
|
123
165
|
})
|
|
124
166
|
})]
|
|
125
167
|
}),
|
|
@@ -127,7 +169,7 @@ function Overview() {
|
|
|
127
169
|
className: "grid gap-5 lg:grid-cols-2",
|
|
128
170
|
children: [/* @__PURE__ */ jsx(Card, {
|
|
129
171
|
title: "Release health",
|
|
130
|
-
subtitle:
|
|
172
|
+
subtitle: `Share of sessions without a crash or unhandled error, per app version, in ${range.label}. Recorded automatically by the SDK.`,
|
|
131
173
|
children: summary.health.releases.length ? /* @__PURE__ */ jsx("div", {
|
|
132
174
|
className: "-mx-4 overflow-x-auto sm:mx-0",
|
|
133
175
|
children: /* @__PURE__ */ jsxs("table", {
|
|
@@ -183,27 +225,171 @@ function Overview() {
|
|
|
183
225
|
})
|
|
184
226
|
}), /* @__PURE__ */ jsx(Card, {
|
|
185
227
|
title: "Failing endpoints",
|
|
186
|
-
subtitle:
|
|
228
|
+
subtitle: `Requests that returned 5xx, timed out or failed in ${range.label}. Captured automatically from fetch and XHR.`,
|
|
187
229
|
children: summary.health.endpoints.length ? /* @__PURE__ */ jsx(ShareBars, { rows: summary.health.endpoints.map((e) => ({
|
|
188
230
|
key: e.endpoint,
|
|
189
|
-
value: e.
|
|
231
|
+
value: e.failuresRange
|
|
190
232
|
})) }) : /* @__PURE__ */ jsx("p", {
|
|
191
233
|
className: "text-sm text-muted",
|
|
192
234
|
children: "No failed requests."
|
|
193
235
|
})
|
|
194
236
|
})]
|
|
195
237
|
}),
|
|
238
|
+
(summary.steps.length > 0 || summary.timings.length > 0) && /* @__PURE__ */ jsxs("div", {
|
|
239
|
+
className: "grid gap-5 lg:grid-cols-2",
|
|
240
|
+
children: [summary.steps.length > 0 && /* @__PURE__ */ jsx(Card, {
|
|
241
|
+
title: "Steps that fail",
|
|
242
|
+
subtitle: `track() outcomes per step in ${range.label}, most failures first.${flow ? ` Filtered to ${flow}.` : ""}`,
|
|
243
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
244
|
+
className: "-mx-4 overflow-x-auto sm:mx-0",
|
|
245
|
+
children: /* @__PURE__ */ jsxs("table", {
|
|
246
|
+
className: "tabular w-full min-w-[420px] text-left text-sm",
|
|
247
|
+
children: [/* @__PURE__ */ jsx("thead", {
|
|
248
|
+
className: "text-xs text-muted",
|
|
249
|
+
children: /* @__PURE__ */ jsxs("tr", {
|
|
250
|
+
className: "border-b border-line",
|
|
251
|
+
children: [
|
|
252
|
+
/* @__PURE__ */ jsx("th", {
|
|
253
|
+
className: "px-4 py-2 font-medium sm:px-2",
|
|
254
|
+
children: "Flow · step"
|
|
255
|
+
}),
|
|
256
|
+
/* @__PURE__ */ jsx("th", {
|
|
257
|
+
className: "px-2 py-2 text-right font-medium",
|
|
258
|
+
children: "Tries"
|
|
259
|
+
}),
|
|
260
|
+
/* @__PURE__ */ jsx("th", {
|
|
261
|
+
className: "px-2 py-2 text-right font-medium",
|
|
262
|
+
children: "Failed"
|
|
263
|
+
}),
|
|
264
|
+
/* @__PURE__ */ jsx("th", {
|
|
265
|
+
className: "px-2 py-2 text-right font-medium",
|
|
266
|
+
children: "Failure rate"
|
|
267
|
+
})
|
|
268
|
+
]
|
|
269
|
+
})
|
|
270
|
+
}), /* @__PURE__ */ jsx("tbody", { children: summary.steps.filter((st) => !flow || st.flow === flow).slice(0, 8).map((st) => /* @__PURE__ */ jsxs("tr", {
|
|
271
|
+
className: "border-b border-line last:border-0",
|
|
272
|
+
children: [
|
|
273
|
+
/* @__PURE__ */ jsxs("td", {
|
|
274
|
+
className: "px-4 py-2 font-mono text-xs sm:px-2",
|
|
275
|
+
children: [
|
|
276
|
+
st.flow,
|
|
277
|
+
" · ",
|
|
278
|
+
st.step
|
|
279
|
+
]
|
|
280
|
+
}),
|
|
281
|
+
/* @__PURE__ */ jsx("td", {
|
|
282
|
+
className: "px-2 py-2 text-right text-muted",
|
|
283
|
+
children: (st.successes + st.failures).toLocaleString()
|
|
284
|
+
}),
|
|
285
|
+
/* @__PURE__ */ jsx("td", {
|
|
286
|
+
className: "px-2 py-2 text-right",
|
|
287
|
+
children: st.failures.toLocaleString()
|
|
288
|
+
}),
|
|
289
|
+
/* @__PURE__ */ jsx("td", {
|
|
290
|
+
className: `px-2 py-2 text-right font-semibold ${st.failureRate !== null && st.failureRate >= .1 ? "text-sev-critical" : ""}`,
|
|
291
|
+
children: st.failureRate === null ? "—" : `${Math.round(st.failureRate * 100)}%`
|
|
292
|
+
})
|
|
293
|
+
]
|
|
294
|
+
}, `${st.flow}|${st.step}`)) })]
|
|
295
|
+
})
|
|
296
|
+
})
|
|
297
|
+
}), summary.timings.length > 0 && /* @__PURE__ */ jsxs(Card, {
|
|
298
|
+
title: "Response times",
|
|
299
|
+
subtitle: `Busiest endpoints in ${range.label}. Measured by the SDK on real devices.`,
|
|
300
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
301
|
+
className: "-mx-4 overflow-x-auto sm:mx-0",
|
|
302
|
+
children: /* @__PURE__ */ jsxs("table", {
|
|
303
|
+
className: "tabular w-full min-w-[420px] text-left text-sm",
|
|
304
|
+
children: [/* @__PURE__ */ jsx("thead", {
|
|
305
|
+
className: "text-xs text-muted",
|
|
306
|
+
children: /* @__PURE__ */ jsxs("tr", {
|
|
307
|
+
className: "border-b border-line",
|
|
308
|
+
children: [
|
|
309
|
+
/* @__PURE__ */ jsx("th", {
|
|
310
|
+
className: "px-4 py-2 font-medium sm:px-2",
|
|
311
|
+
children: "Endpoint"
|
|
312
|
+
}),
|
|
313
|
+
/* @__PURE__ */ jsx("th", {
|
|
314
|
+
className: "px-2 py-2 text-right font-medium",
|
|
315
|
+
children: "Requests"
|
|
316
|
+
}),
|
|
317
|
+
/* @__PURE__ */ jsx("th", {
|
|
318
|
+
className: "px-2 py-2 text-right font-medium",
|
|
319
|
+
children: "p50"
|
|
320
|
+
}),
|
|
321
|
+
/* @__PURE__ */ jsx("th", {
|
|
322
|
+
className: "px-2 py-2 text-right font-medium",
|
|
323
|
+
children: "p95"
|
|
324
|
+
}),
|
|
325
|
+
/* @__PURE__ */ jsx("th", {
|
|
326
|
+
className: "px-2 py-2 text-right font-medium",
|
|
327
|
+
children: "Failed"
|
|
328
|
+
})
|
|
329
|
+
]
|
|
330
|
+
})
|
|
331
|
+
}), /* @__PURE__ */ jsx("tbody", { children: summary.timings.map((t) => /* @__PURE__ */ jsxs("tr", {
|
|
332
|
+
className: "border-b border-line last:border-0",
|
|
333
|
+
children: [
|
|
334
|
+
/* @__PURE__ */ jsx("td", {
|
|
335
|
+
className: "max-w-[220px] truncate px-4 py-2 font-mono text-xs sm:px-2",
|
|
336
|
+
title: t.endpoint,
|
|
337
|
+
children: t.endpoint
|
|
338
|
+
}),
|
|
339
|
+
/* @__PURE__ */ jsx("td", {
|
|
340
|
+
className: "px-2 py-2 text-right text-muted",
|
|
341
|
+
children: t.requests.toLocaleString()
|
|
342
|
+
}),
|
|
343
|
+
/* @__PURE__ */ jsx("td", {
|
|
344
|
+
className: "px-2 py-2 text-right",
|
|
345
|
+
children: ms(t.p50)
|
|
346
|
+
}),
|
|
347
|
+
/* @__PURE__ */ jsx("td", {
|
|
348
|
+
className: `px-2 py-2 text-right font-semibold ${t.p95 !== null && t.p95 >= 3e3 ? "text-sev-high" : ""}`,
|
|
349
|
+
children: ms(t.p95)
|
|
350
|
+
}),
|
|
351
|
+
/* @__PURE__ */ jsx("td", {
|
|
352
|
+
className: `px-2 py-2 text-right ${t.errorRate >= .05 ? "font-semibold text-sev-critical" : "text-muted"}`,
|
|
353
|
+
children: `${(t.errorRate * 100).toFixed(t.errorRate < .1 ? 1 : 0)}%`
|
|
354
|
+
})
|
|
355
|
+
]
|
|
356
|
+
}, t.endpoint)) })]
|
|
357
|
+
})
|
|
358
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
359
|
+
className: "mt-2 text-xs text-muted",
|
|
360
|
+
children: "p50/p95: half / 95% of requests finished within this time."
|
|
361
|
+
})]
|
|
362
|
+
})]
|
|
363
|
+
}),
|
|
196
364
|
/* @__PURE__ */ jsx(Card, {
|
|
197
365
|
title: flow ? `Issues in ${flow}` : "Issues by severity",
|
|
198
|
-
subtitle:
|
|
199
|
-
right:
|
|
200
|
-
className: "
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
366
|
+
subtitle: `Grouped errors seen in ${range.label}. Severity is set by occurrences in the last 24 hours.`,
|
|
367
|
+
right: /* @__PURE__ */ jsxs("div", {
|
|
368
|
+
className: "flex flex-wrap items-center justify-end gap-1 text-xs",
|
|
369
|
+
children: [flow && /* @__PURE__ */ jsx("button", {
|
|
370
|
+
className: "mr-2 text-accent",
|
|
371
|
+
onClick: () => navigate({ search: (s) => ({
|
|
372
|
+
...s,
|
|
373
|
+
flow: void 0
|
|
374
|
+
}) }),
|
|
375
|
+
children: "Clear flow ×"
|
|
376
|
+
}), [
|
|
377
|
+
"open",
|
|
378
|
+
"resolved",
|
|
379
|
+
"ignored",
|
|
380
|
+
"all"
|
|
381
|
+
].map((st) => /* @__PURE__ */ jsxs("button", {
|
|
382
|
+
onClick: () => navigate({ search: (s) => ({
|
|
383
|
+
...s,
|
|
384
|
+
status: st === "open" ? void 0 : st
|
|
385
|
+
}) }),
|
|
386
|
+
className: `rounded-md border px-2 py-1 capitalize ${statusFilter === st ? "border-accent bg-accent-soft text-accent" : "border-line text-muted hover:bg-panel-2"}`,
|
|
387
|
+
children: [st, st !== "all" && /* @__PURE__ */ jsx("span", {
|
|
388
|
+
className: "ml-1 opacity-70",
|
|
389
|
+
children: countFor(st)
|
|
390
|
+
})]
|
|
391
|
+
}, st))]
|
|
392
|
+
}),
|
|
207
393
|
children: /* @__PURE__ */ jsx("div", {
|
|
208
394
|
className: "-mx-4 overflow-x-auto sm:mx-0",
|
|
209
395
|
children: /* @__PURE__ */ jsxs("table", {
|
|
@@ -225,13 +411,17 @@ function Overview() {
|
|
|
225
411
|
className: "px-2 py-2 font-medium",
|
|
226
412
|
children: "Flow"
|
|
227
413
|
}),
|
|
414
|
+
/* @__PURE__ */ jsx("th", {
|
|
415
|
+
className: "px-2 py-2 text-right font-medium",
|
|
416
|
+
children: "Users"
|
|
417
|
+
}),
|
|
228
418
|
/* @__PURE__ */ jsx("th", {
|
|
229
419
|
className: "px-2 py-2 text-right font-medium",
|
|
230
420
|
children: "24h"
|
|
231
421
|
}),
|
|
232
422
|
/* @__PURE__ */ jsx("th", {
|
|
233
423
|
className: "px-2 py-2 text-right font-medium",
|
|
234
|
-
children: "Total"
|
|
424
|
+
children: span === "24h" ? "Total" : span === "range" ? "Range" : span
|
|
235
425
|
}),
|
|
236
426
|
/* @__PURE__ */ jsx("th", {
|
|
237
427
|
className: "px-2 py-2 text-right font-medium",
|
|
@@ -248,16 +438,27 @@ function Overview() {
|
|
|
248
438
|
}),
|
|
249
439
|
/* @__PURE__ */ jsxs("td", {
|
|
250
440
|
className: "max-w-[420px] px-2 py-2.5",
|
|
251
|
-
children: [
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
441
|
+
children: [
|
|
442
|
+
/* @__PURE__ */ jsx(Link, {
|
|
443
|
+
to: "/issues/$fingerprint",
|
|
444
|
+
params: { fingerprint: i.fingerprint },
|
|
445
|
+
search: {
|
|
446
|
+
app: summary.app,
|
|
447
|
+
range: range.preset === "14d" ? void 0 : range.preset,
|
|
448
|
+
...range.preset === "custom" ? {
|
|
449
|
+
from: range.from,
|
|
450
|
+
to: range.to
|
|
451
|
+
} : {}
|
|
452
|
+
},
|
|
453
|
+
className: "block truncate font-medium hover:text-accent",
|
|
454
|
+
children: i.title
|
|
455
|
+
}),
|
|
456
|
+
i.culprit && /* @__PURE__ */ jsx("div", {
|
|
457
|
+
className: "truncate font-mono text-xs text-muted",
|
|
458
|
+
children: i.culprit
|
|
459
|
+
}),
|
|
460
|
+
/* @__PURE__ */ jsx(IssueLabels, { issue: i })
|
|
461
|
+
]
|
|
261
462
|
}),
|
|
262
463
|
/* @__PURE__ */ jsx("td", {
|
|
263
464
|
className: "px-2 py-2.5 text-xs",
|
|
@@ -266,13 +467,17 @@ function Overview() {
|
|
|
266
467
|
children: "untagged"
|
|
267
468
|
})
|
|
268
469
|
}),
|
|
470
|
+
/* @__PURE__ */ jsx("td", {
|
|
471
|
+
className: "px-2 py-2.5 text-right text-muted",
|
|
472
|
+
children: i.users ?? "—"
|
|
473
|
+
}),
|
|
269
474
|
/* @__PURE__ */ jsx("td", {
|
|
270
475
|
className: "px-2 py-2.5 text-right font-semibold",
|
|
271
476
|
children: i.count24h
|
|
272
477
|
}),
|
|
273
478
|
/* @__PURE__ */ jsx("td", {
|
|
274
479
|
className: "px-2 py-2.5 text-right text-muted",
|
|
275
|
-
children: i.countTotal
|
|
480
|
+
children: span === "24h" ? i.countTotal : i.countRange
|
|
276
481
|
}),
|
|
277
482
|
/* @__PURE__ */ jsx("td", {
|
|
278
483
|
className: "px-2 py-2.5 text-right text-xs text-muted",
|
|
@@ -280,7 +485,7 @@ function Overview() {
|
|
|
280
485
|
})
|
|
281
486
|
]
|
|
282
487
|
}, i.fingerprint)), !issues.length && /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", {
|
|
283
|
-
colSpan:
|
|
488
|
+
colSpan: 7,
|
|
284
489
|
className: "px-2 py-6 text-center text-muted",
|
|
285
490
|
children: "No issues."
|
|
286
491
|
}) })] })]
|
|
@@ -290,9 +495,25 @@ function Overview() {
|
|
|
290
495
|
/* @__PURE__ */ jsxs("div", {
|
|
291
496
|
className: "grid gap-5 md:grid-cols-3",
|
|
292
497
|
children: [
|
|
498
|
+
/* @__PURE__ */ jsx(Card, {
|
|
499
|
+
title: "By network",
|
|
500
|
+
subtitle: `Errors, ${range.label}`,
|
|
501
|
+
children: /* @__PURE__ */ jsx(ShareBars, { rows: summary.breakdowns.network.map((r) => ({
|
|
502
|
+
key: r.key,
|
|
503
|
+
value: r.errors
|
|
504
|
+
})) })
|
|
505
|
+
}),
|
|
506
|
+
/* @__PURE__ */ jsx(Card, {
|
|
507
|
+
title: "By country",
|
|
508
|
+
subtitle: `Errors, ${range.label}. From the device's timezone, not its IP.`,
|
|
509
|
+
children: /* @__PURE__ */ jsx(ShareBars, { rows: summary.breakdowns.country.map((r) => ({
|
|
510
|
+
key: r.key,
|
|
511
|
+
value: r.errors
|
|
512
|
+
})) })
|
|
513
|
+
}),
|
|
293
514
|
/* @__PURE__ */ jsx(Card, {
|
|
294
515
|
title: "By OS",
|
|
295
|
-
subtitle:
|
|
516
|
+
subtitle: `Errors, ${range.label}`,
|
|
296
517
|
children: /* @__PURE__ */ jsx(ShareBars, { rows: summary.breakdowns.os.map((r) => ({
|
|
297
518
|
key: r.key,
|
|
298
519
|
value: r.errors
|
|
@@ -300,7 +521,7 @@ function Overview() {
|
|
|
300
521
|
}),
|
|
301
522
|
/* @__PURE__ */ jsx(Card, {
|
|
302
523
|
title: "By app version",
|
|
303
|
-
subtitle:
|
|
524
|
+
subtitle: `Errors, ${range.label}`,
|
|
304
525
|
children: /* @__PURE__ */ jsx(ShareBars, { rows: summary.breakdowns.appVersion.map((r) => ({
|
|
305
526
|
key: r.key,
|
|
306
527
|
value: r.errors
|
|
@@ -308,7 +529,7 @@ function Overview() {
|
|
|
308
529
|
}),
|
|
309
530
|
/* @__PURE__ */ jsx(Card, {
|
|
310
531
|
title: "By device",
|
|
311
|
-
subtitle:
|
|
532
|
+
subtitle: `Errors, ${range.label}`,
|
|
312
533
|
children: /* @__PURE__ */ jsx(ShareBars, { rows: summary.breakdowns.deviceModel.map((r) => ({
|
|
313
534
|
key: r.key,
|
|
314
535
|
value: r.errors
|
|
@@ -481,4 +702,9 @@ await deBug.track("auth.login", "submit_otp", () => verifyOtp(code));`
|
|
|
481
702
|
]
|
|
482
703
|
});
|
|
483
704
|
}
|
|
705
|
+
function ms(v) {
|
|
706
|
+
if (v === null) return "—";
|
|
707
|
+
if (!Number.isFinite(v)) return "> 10 s";
|
|
708
|
+
return v >= 1e3 ? `≤ ${(v / 1e3).toFixed(v % 1e3 ? 1 : 0)} s` : `≤ ${v} ms`;
|
|
709
|
+
}
|
|
484
710
|
export { Overview as component };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
// \0tanstack-start-manifest:v
|
|
2
|
+
var tsrStartManifest = () => ({ routes: {
|
|
3
|
+
__root__: {
|
|
4
|
+
filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/__root.tsx",
|
|
5
|
+
children: [
|
|
6
|
+
"/_authed",
|
|
7
|
+
"/login",
|
|
8
|
+
"/api/ingest",
|
|
9
|
+
"/api/summary",
|
|
10
|
+
"/invite/$token",
|
|
11
|
+
"/api/issues/$fingerprint"
|
|
12
|
+
],
|
|
13
|
+
preloads: ["/assets/index-CMjwqklY.js", "/assets/preload-helper-Dscj_TcA.js"],
|
|
14
|
+
scripts: [{ attrs: {
|
|
15
|
+
type: "module",
|
|
16
|
+
async: !0,
|
|
17
|
+
src: "/assets/index-CMjwqklY.js"
|
|
18
|
+
} }]
|
|
19
|
+
},
|
|
20
|
+
"/_authed": {
|
|
21
|
+
filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed.tsx",
|
|
22
|
+
children: [
|
|
23
|
+
"/_authed/settings",
|
|
24
|
+
"/_authed/team",
|
|
25
|
+
"/_authed/",
|
|
26
|
+
"/_authed/issues/$fingerprint"
|
|
27
|
+
],
|
|
28
|
+
preloads: ["/assets/_authed-Rg-Gabby.js", "/assets/ui-C0HGOza2.js"]
|
|
29
|
+
},
|
|
30
|
+
"/login": {
|
|
31
|
+
filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/login.tsx",
|
|
32
|
+
children: void 0,
|
|
33
|
+
preloads: ["/assets/login-BG9v4zhc.js", "/assets/ui-C0HGOza2.js"]
|
|
34
|
+
},
|
|
35
|
+
"/_authed/settings": {
|
|
36
|
+
filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/settings.tsx",
|
|
37
|
+
children: void 0,
|
|
38
|
+
preloads: ["/assets/settings-Ce1uqKl0.js"]
|
|
39
|
+
},
|
|
40
|
+
"/_authed/team": {
|
|
41
|
+
filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/team.tsx",
|
|
42
|
+
children: void 0,
|
|
43
|
+
preloads: ["/assets/team-TUMAZ4jv.js"]
|
|
44
|
+
},
|
|
45
|
+
"/invite/$token": {
|
|
46
|
+
filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/invite.$token.tsx",
|
|
47
|
+
children: void 0,
|
|
48
|
+
preloads: ["/assets/invite._token-CDogkC9p.js", "/assets/ui-C0HGOza2.js"]
|
|
49
|
+
},
|
|
50
|
+
"/_authed/": {
|
|
51
|
+
filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/index.tsx",
|
|
52
|
+
children: void 0,
|
|
53
|
+
preloads: ["/assets/_authed-BMdIkvB6.js", "/assets/charts-QIIL2Fv7.js"]
|
|
54
|
+
},
|
|
55
|
+
"/_authed/issues/$fingerprint": {
|
|
56
|
+
filePath: "/Users/sivemwanda/Work/Tanstack/deBug/apps/dashboard/src/routes/_authed/issues.$fingerprint.tsx",
|
|
57
|
+
children: void 0,
|
|
58
|
+
preloads: ["/assets/issues._fingerprint-DLe_lV5d.js", "/assets/charts-QIIL2Fv7.js"]
|
|
59
|
+
}
|
|
60
|
+
} });
|
|
61
|
+
export { tsrStartManifest };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Area, AreaChart, Bar, BarChart, CartesianGrid, Cell, ResponsiveContainer, Tooltip, XAxis, YAxis } from "recharts";
|
|
3
|
+
import { Area, AreaChart, Bar, BarChart, CartesianGrid, Cell, ReferenceLine, ResponsiveContainer, Tooltip, XAxis, YAxis } from "recharts";
|
|
4
4
|
// src/components/charts.tsx
|
|
5
5
|
var SEV_COLOR = {
|
|
6
6
|
critical: "var(--sev-critical)",
|
|
@@ -34,12 +34,18 @@ function ClientOnly({ height, children }) {
|
|
|
34
34
|
children: ready ? children : null
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
|
|
37
|
+
/** "13 Nov" for a day, "14:00" for an hour bucket ("YYYY-MM-DDTHH"). */
|
|
38
|
+
var shortDay = (d) => d.length === 13 ? `${d.slice(11)}:00` : (/* @__PURE__ */ new Date(`${d}T00:00:00Z`)).toLocaleDateString(void 0, {
|
|
38
39
|
month: "short",
|
|
39
40
|
day: "numeric",
|
|
40
41
|
timeZone: "UTC"
|
|
41
42
|
});
|
|
42
|
-
function TrendChart({ data }) {
|
|
43
|
+
function TrendChart({ data, markers = [] }) {
|
|
44
|
+
const days = data.map((d) => d.day);
|
|
45
|
+
const snapped = markers.map((m) => ({
|
|
46
|
+
...m,
|
|
47
|
+
x: [...days].reverse().find((d) => d <= m.day)
|
|
48
|
+
})).filter((m) => !!m.x);
|
|
43
49
|
return /* @__PURE__ */ jsx(ClientOnly, {
|
|
44
50
|
height: 220,
|
|
45
51
|
children: /* @__PURE__ */ jsx(ResponsiveContainer, {
|
|
@@ -96,7 +102,18 @@ function TrendChart({ data }) {
|
|
|
96
102
|
stroke: "var(--chart-errors)",
|
|
97
103
|
strokeWidth: 2,
|
|
98
104
|
fill: "url(#errFill)"
|
|
99
|
-
})
|
|
105
|
+
}),
|
|
106
|
+
snapped.map((m) => /* @__PURE__ */ jsx(ReferenceLine, {
|
|
107
|
+
x: m.x,
|
|
108
|
+
stroke: "var(--chart-events)",
|
|
109
|
+
strokeDasharray: "3 3",
|
|
110
|
+
label: {
|
|
111
|
+
value: m.label,
|
|
112
|
+
position: "insideTopLeft",
|
|
113
|
+
fontSize: 10,
|
|
114
|
+
fill: "var(--chart-events)"
|
|
115
|
+
}
|
|
116
|
+
}, `${m.label}${m.day}`))
|
|
100
117
|
]
|
|
101
118
|
})
|
|
102
119
|
})
|