mirror of
https://github.com/OutlineFoundation/outline-server.git
synced 2026-05-13 13:58:57 +00:00
* upgrade dependencies and fix API changes * skipLibCheck * attempt test fixes * fix attempt * stream-http * fix final thing i think |
||
|---|---|---|
| .. | ||
| infrastructure | ||
| app_dev.yaml | ||
| app_prod.yaml | ||
| build.action.sh | ||
| config_dev.json | ||
| config_prod.json | ||
| connection_metrics.spec.ts | ||
| connection_metrics.ts | ||
| deploy_dev.action.sh | ||
| deploy_prod.action.sh | ||
| dispatch.yaml | ||
| feature_metrics.spec.ts | ||
| feature_metrics.ts | ||
| index.ts | ||
| model.ts | ||
| package.json | ||
| README.md | ||
| start.action.sh | ||
| test.action.sh | ||
| test_integration.action.sh | ||
| tsconfig.json | ||
Outline Metrics Server
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.
API
Endpoints
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).
URLs
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 } }
Requirements
Build
npm run action metrics_server/build
Run
Run a local development metrics server:
npm run action metrics_server/start
Deploy
- Authenticate with
gcloud:gcloud auth login - To deploy to dev:
npm run action metrics_server/deploy_dev - To deploy to prod:
npm run action metrics_server/deploy_prod
Test
- Unit test
npm run action metrics_server/test - Integration test
npm run action metrics_server/test_integration