A self-contained FastAPI server that stores
@microsoft/snapfeed telemetry events in SQLite.
pip install fastapi uvicorn
uvicorn server:app --port 8420Then point the snapfeed client at it:
import { initSnapfeed } from '@microsoft/snapfeed'
initSnapfeed({ endpoint: 'http://localhost:8420/api/telemetry/events' })| Method | Path | Description |
|---|---|---|
| POST | /api/telemetry/events |
Ingest a batch of events |
| GET | /api/telemetry/events |
Query events (filter by session_id, event_type, limit) |
| GET | /api/telemetry/sessions |
List sessions with event counts |
| GET | /api/telemetry/events/{id}/screenshot |
Serve a feedback screenshot as JPEG |
server.py— Complete server (~100 lines)requirements.txt— Dependencies