Events Archiver processes events emitted by BinderHub & makes them publicly available. It reads from a Google Cloud Storage bucket populated by StackDriver export, puts them into a more standard format, and publishes it to another GCS bucket.
Timestamp resolution reduction
Publicly published events have timestamps with minute resolution - second & microsecond information is trimmed. This is a precautionary measure to protect against possibly de-anonymization attacks in the future.
You can test events archiver locally with:
GOOGLE_APPLICATION_CREDENTIALS=secrets/analytics-publisher-auth-key-prod.json \ python3 images/analytics-publisher/archiver.py \ --debug \ --dry-run \ binder-prod binderhub-events-text \ mybinder-events-raw-export mybinder-events-archive
--dry-run options tell the script to print output
to stdout, rather than upload to another GCS bucket.