ReviewOS

stacks/ts-analytics

Raw events written with no TTL -> indefinite retention

#143
Closed glennmichael123 opened this 9 days ago ·
9 days ago

Severity: High · Where: orm/index.ts:160-184,378-398,574-603 PageView.record/Session.upsert/CustomEvent.record omit a ttl attribute despite traits.useTtl:true. Only clicks/engagement/vitals/errors get TTL (hardcoded in collect.ts:337,370,454,481). Docs/config promise 30-day raw retention; visitor-hash/path/referrer/geo/UTM rows live forever. Impact: Privacy + storage cost. Fix: Set ttl from config.retention on raw writes; make hardcoded TTLs config-driven.

Sign in to comment on this issue.