Go to file
Michael Mainguy fd1a92f7e3
All checks were successful
Build / build (push) Successful in 2m0s
Add analytics abstraction layer with intelligent batching
Implements a flexible, provider-agnostic analytics system with New Relic adapter featuring intelligent event batching for cost optimization.

Features:
- Type-safe event tracking with TypeScript interfaces
- Pluggable adapter architecture for multiple providers
- Intelligent batching (reduces data usage by 70-90%)
- Event sampling for high-volume events
- Zero breaking changes to existing New Relic setup
- Debug mode for development testing

Integration points:
- Session tracking in main.ts
- Level start and WebXR events in level1.ts
- Asteroid destruction and hull damage in ship.ts
- Performance snapshots and session end in gameStats.ts

Events tracked:
- session_start, session_end
- webxr_session_start
- level_start
- asteroid_destroyed (20% sampled)
- hull_damage
- gameplay_snapshot (60s intervals, 50% sampled)

Cost optimization:
- Batching reduces individual events by ~70%
- Sampling reduces high-frequency events by 50-80%
- Combined savings: ~90% data reduction
- Keeps usage safely under New Relic free tier (100GB/month)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-12 16:22:28 -06:00
.github/workflows increased heap space. 2025-10-28 12:01:29 -05:00
docs Add Blender export tooling and refactor asset structure 2025-11-06 12:25:34 -06:00
public Add New Relic browser monitoring and update base station model 2025-11-12 11:11:00 -06:00
scripts Implement hybrid level storage system with JSON-based defaults and configurable orbit constraints 2025-11-11 18:40:01 -06:00
server Initial Commit 2025-02-15 11:19:24 -06:00
src Add analytics abstraction layer with intelligent batching 2025-11-12 16:22:28 -06:00
themes/default Add New Relic browser monitoring and update base station model 2025-11-12 11:11:00 -06:00
.gitignore Initial Commit 2025-02-15 11:19:24 -06:00
ANALYTICS_IMPLEMENTATION.md Add analytics abstraction layer with intelligent batching 2025-11-12 16:22:28 -06:00
CLAUDE.md Refactor asteroid scaling and reorganize assets 2025-11-10 12:19:31 -06:00
CONTROLLER_THRUST.md Refactor ship controls to force-based physics with world-space transformations 2025-10-31 11:20:31 -05:00
index.html Fix mesh rendering and CloudFlare proxy compatibility 2025-11-11 06:13:48 -06:00
package-lock.json Add New Relic browser monitoring and update base station model 2025-11-12 11:11:00 -06:00
package.json Add New Relic browser monitoring and update base station model 2025-11-12 11:11:00 -06:00
tsconfig.json Initial Commit 2025-02-15 11:19:24 -06:00
vite.config.ts Fix mesh rendering and CloudFlare proxy compatibility 2025-11-11 06:13:48 -06:00