fix(observers): separate packet metrics from presence updates

This commit is contained in:
n30nex authored and MrAlders0n committed 2026-09-30 07:19:02 -04:00
1 parent fd7c6b3eb7
commit 5fbba24a4a
31 files changed
+844 -93

No files matched your search

+2
View File
@@ -58,6 +58,8 @@ type Querier interface {
// Hour-or-coarser buckets summed from the hourly rollup; same COALESCE-plus-count shape as the raw query.
GetObserverActivityHourly(ctx context.Context, arg GetObserverActivityHourlyParams) ([]GetObserverActivityHourlyRow, error)
GetObserverActivityHourlyPayloadTypes(ctx context.Context, arg GetObserverActivityHourlyPayloadTypesParams) ([]GetObserverActivityHourlyPayloadTypesRow, error)
// Two indexed ranges, bounded to one observer; no legacy presence counters.
GetObserverActivityLiveSummary(ctx context.Context, arg GetObserverActivityLiveSummaryParams) (GetObserverActivityLiveSummaryRow, error)
// Sub-hour activity buckets straight off idx_observations_observer; no join to packets.
// Aggregates are COALESCEd and paired with a count column: sqlc types a cast expression as
// NOT NULL, so the counts are what tell the store a bucket had no costed or no signal rows.