feat(analytics): build-time bake + telemetry depth (#336)

Bake PostHog + Sentry into the published Docker image (SNAPOTTER_ANALYTICS
build arg, codegen script). Delete entire consent system. Move event emission
to BullMQ worker. Add cross-tier identity stitching, Sentry performance
tracing on both tiers, frontend funnel events. Fix stateful regex bug.

86 files changed, 1593 insertions(+), 3747 deletions(-)
This commit is contained in:
SnapOtter
2026-06-24 11:05:39 +08:00
committed by GitHub
parent a53038ed96
commit 5d36ac06d8
86 changed files with 1594 additions and 3748 deletions
+7
View File
@@ -59,6 +59,13 @@ COPY packages/shared/src ./packages/shared/src
COPY apps/web/src ./apps/web/src
COPY apps/web/public ./apps/web/public
# Bake analytics config into the shared package before building the frontend.
# The published image ships with analytics ON; self-builders can override:
# docker compose build --build-arg SNAPOTTER_ANALYTICS=off
ARG SNAPOTTER_ANALYTICS=on
COPY scripts/bake-analytics.mjs ./scripts/
RUN node scripts/bake-analytics.mjs ${SNAPOTTER_ANALYTICS}
# Build only the web frontend (API runs from TS source via tsx)
RUN --mount=type=cache,id=turbo-cache,target=/app/.turbo \
pnpm --filter @snapotter/web build
+2
View File
@@ -10,6 +10,8 @@ services:
build:
context: ..
dockerfile: docker/Dockerfile
args:
SNAPOTTER_ANALYTICS: "on"
image: snapotter/snapotter:latest
container_name: SnapOtter
ports:
+2
View File
@@ -9,6 +9,8 @@ services:
build:
context: ..
dockerfile: docker/Dockerfile
args:
SNAPOTTER_ANALYTICS: "on"
image: snapotter/snapotter:latest
container_name: SnapOtter
ports: