The Outline Metrics Server is a Google App Engine project that writes feature and connections metrics to BigQuery, as reported by opted-in Outline servers.
The metrics server deploys two services: dev
, used for development testing and debugging; and prod
, used for production metrics. The dev
environment is deployed to https://dev.metrics.getoutline.org
; the prod
environment is deployed to https://prod.metrics.getoutline.org
. Each environment posts metrics to its own BigQuery dataset (see config_[dev|prod].json
).
The metrics server supports two URL paths:
-
POST /connections
: report server data usage broken down by user.{ serverId: string, startUtcMs: number, endUtcMs: number, userReports: [{ userId: string, countries: string[], bytesTransferred: number, }] }
-
POST /features
: report feature usage.{ serverId: string, serverVersion: string, timestampUtcMs: number, dataLimit: { enabled: boolean perKeyLimitCount: number } }
yarn do metrics_server/build
Run a local development metrics server:
yarn do metrics_server/run
- Authenticate with
gcloud
:gcloud auth login
- To deploy to dev:
yarn do metrics_server/deploy_dev
- To deploy to prod:
yarn do metrics_server/deploy_prod
- Unit test
yarn do metrics_server/test
- Integration test
yarn do metrics_server/test_integration