feat(telemetry): session journey view replaces raw events table
- sessions listed from client_events grouped by session id (7d window) - timeline sheet merges page views, client events, errors, and server-fn activities joined by player within the session window - vitals excluded from timelines; gap markers over 5 minutes
This commit is contained in:
@@ -40,6 +40,8 @@ export interface ActivitySearchParams {
|
||||
name?: string;
|
||||
player?: string;
|
||||
success?: boolean;
|
||||
from?: string;
|
||||
to?: string;
|
||||
sortBy?: string;
|
||||
}
|
||||
|
||||
@@ -57,6 +59,8 @@ export function createActivitiesService(pb: PocketBase) {
|
||||
name,
|
||||
player,
|
||||
success,
|
||||
from,
|
||||
to,
|
||||
sortBy = "-created"
|
||||
} = params;
|
||||
|
||||
@@ -74,6 +78,14 @@ export function createActivitiesService(pb: PocketBase) {
|
||||
filters.push(pbFilter(pb, "success = {:success}", { success }));
|
||||
}
|
||||
|
||||
if (from) {
|
||||
filters.push(pbFilter(pb, "created >= {:from}", { from }));
|
||||
}
|
||||
|
||||
if (to) {
|
||||
filters.push(pbFilter(pb, "created < {:to}", { to }));
|
||||
}
|
||||
|
||||
const filterString = filters.length > 0 ? filters.join(" && ") : "";
|
||||
|
||||
const result = await pb.collection("activities").getList<Activity>(page, perPage, {
|
||||
|
||||
@@ -125,6 +125,7 @@ export interface ClientErrorSearchParams {
|
||||
groupHash?: string;
|
||||
resolved?: boolean;
|
||||
player?: string;
|
||||
sessionId?: string;
|
||||
from?: string;
|
||||
to?: string;
|
||||
sortBy?: string;
|
||||
@@ -175,12 +176,13 @@ export function createTelemetryService(pb: PocketBase) {
|
||||
async searchClientErrors(
|
||||
params: ClientErrorSearchParams = {}
|
||||
): Promise<TelemetryListResult<ClientErrorRecord>> {
|
||||
const { page = 1, perPage = 100, groupHash, resolved, player, from, to, sortBy = "-created" } = params;
|
||||
const { page = 1, perPage = 100, groupHash, resolved, player, sessionId, from, to, sortBy = "-created" } = params;
|
||||
|
||||
const filters: string[] = [];
|
||||
if (groupHash) filters.push(pbFilter(pb, "group_hash = {:groupHash}", { groupHash }));
|
||||
if (resolved !== undefined) filters.push(pbFilter(pb, "resolved = {:resolved}", { resolved }));
|
||||
if (player) filters.push(pbFilter(pb, "player = {:player}", { player }));
|
||||
if (sessionId) filters.push(pbFilter(pb, "session_id = {:sessionId}", { sessionId }));
|
||||
if (from) filters.push(pbFilter(pb, "created >= {:from}", { from }));
|
||||
if (to) filters.push(pbFilter(pb, "created < {:to}", { to }));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user