This service manages analytics from all sources of interest: Marketing Site, Cloud UI, Cluster API and delivers these events to Segment for downstream processing.
Start virtual environment
source env/bin/activate
Install dependencies
pip install -r requirements.txt
Start the server with
uvicorn app.main:app --host 0.0.0.0 --port 8000
Ngrok
To test with webhooks, etc which will forward to localhost and handle https requests.
ngrok http 8000
APP_TZ=UTC
API_AUTHENTICATION_KEY=...
SEGMENT_WRITE_KEY=...
ALLOWED_ORIGINS=http://localhost:1313,http://localhost:3000
Run from the root directory
PYTHONPATH=. pytest app/tests
Can run
docker-compose build && docker-compose up
Requires authentication token (API_AUTHENTICATION_KEY
) and allow listing origin(s) (ALLOWED_ORIGINS
)
- /healthcheck (GET request)
- /anonymous_id (GET request)
- /identify (POST request)
- /track (POST request)
- /page (POST request)
Make requests to http://0.0.0.0:8000
- Development
- Staging
- Production
- Development Debugger Dashboard
- Staging Debugger Dashboard (to be setup)
- Production Debugger Dashboard (to be setup)