Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.21 KB

README.md

File metadata and controls

56 lines (42 loc) · 1.21 KB

Uptime Status

ballet-study-telemetry-server

Record telemetry events generated by ballet contributors. Only records data from those who have opted in.

Routes

GET /api/v1/optedin?id=<str:id>

The provided ID is the sha1 of the GitHub user's login. Returns yes|no|unknown as to whether they indicated that they opted in to telemetry data collection.

POST /api/v1/events

Record events from a ballet contributor and save them in the DB. Data on the POST body is json of the follow form:

[
    {
        "id": "unique event ID, usually uuid4",
        "host": "hostname of contributor's machine (i.e. some mybinder.org-related host)",
        "gh": "sha1 of github login",
        "name": "event name",
        "dt": "str-encoded event timestamp",
        "details": "any additional details"
    },
    # etc.
]

Usage

Run locally

pipenv install --dev
pipenv run invoke serve

Run on heroku

invoke push-env
git push heroku master

Sync usernames

Worker that syncs the usernames of those who opted in to telemetry data collection on their Google Forms response. Runs every 5 minutes.