How mitsuha-24/code-analyzer works
Telemetry Logger is a VS Code data-collection extension with an optional network collector and a MongoDB ingestion/research-data pipeline. The main workflow is editor activity → aggregated session summaries (and documented snapshot payloads) → local backup and optional POST → collector storage → scheduled or manual ingestion → normalized research records. The extension’s detailed internals are only partially excerpted, so its feature components and links rely on README statements; pipeline links are limited to shown code or indexed references.
Main entry points: Ingest.js JSONL ingestion · server.js HTTP collector · Cli.js Pipeline CLI · extension.ts Session aggregation
Components 17
VS Code Capture
- Editor activity
- Session aggregation
src/extension.ts - Paste analysis
src/extension.ts - Run and focus signals
src/extension.ts - Code snapshots
server/server.js
Collection
- Local JSONL backup
server/server.js - HTTP collector
server/server.js - Ingest scheduling
server/pipeline/hooks.js - Snapshot files
server/server.js
Ingestion Pipeline
- Record transformation
server/pipeline/Transform.js - JSONL ingestion
server/pipeline/Ingest.js - Database connection
server/pipeline/Db.js
Research Data
- MongoDB
- Pipeline CLI
server/pipeline/Cli.js - Research records
server/pipeline/Ingest.js - Labels and splits
server/pipeline/Cli.js
Other components
- VS Code user
Connections 24
- VS Code user → Editor activity: creates activity
README.md - Editor activity → Session aggregation: aggregates into
README.md - Session aggregation → Paste analysis: tracks paste edits
README.md - Session aggregation → Run and focus signals: tracks runs and focus
README.md - Session aggregation → Local JSONL backup: writes summaries
README.md - Session aggregation → HTTP collector: POSTs summaries
README.md - Code snapshots → HTTP collector: accepts snapshot payloads
server/server.js - HTTP collector → Local JSONL backup: appends summaries
server/server.js - HTTP collector → Snapshot files: materializes snapshots
server/server.js - HTTP collector → Ingest scheduling: routes admin requests
server/server.js - HTTP collector → Ingest scheduling: schedules on session end
server/server.js - Ingest scheduling → JSONL ingestion: dispatches ingestion
server/pipeline/hooks.js - JSONL ingestion → Record transformation: builds normalized records
server/pipeline/Ingest.js - JSONL ingestion → Database connection: connects on demand
server/pipeline/Ingest.js - JSONL ingestion → MongoDB: writes collections
server/pipeline/Ingest.js - Database connection → MongoDB: opens connection
server/pipeline/Db.js - JSONL ingestion → Snapshot files: reads snapshot content
- JSONL ingestion → Research records: stores windows and events
server/pipeline/Ingest.js - Pipeline CLI → JSONL ingestion: runs file ingestion
server/pipeline/Cli.js - Pipeline CLI → Ingest scheduling: runs bulk ingestion
server/pipeline/Cli.js - Pipeline CLI → Database connection: opens database
server/pipeline/Cli.js - Pipeline CLI → MongoDB: manages research data
server/pipeline/Cli.js - Pipeline CLI → Labels and splits: imports labels and splits
server/pipeline/Cli.js - Labels and splits → MongoDB: updates sessions
server/pipeline/Cli.js