tree: ea1bd5bbf5c5db64dfe2f6b92e370b459b176447 [path history] [tgz]
  1. testdata/
  2. cloudbuild.yaml
  3. deploy-prod.yaml
  4. Dockerfile
  5. main.go
  6. main_test.go
  7. README.md
godev/cmd/telemetrygodev/README.md

telemetrygodev

Local Development

For local development, simply build and run. It serves on localhost:8080.

go run ./godev/cmd/telemetrygodev

By default, the server will use the filesystem for storage object I/O. Use the -gcs flag to use the Cloud Storage API.

go run ./godev/cmd/worker --gcs

Optionally, use the localstorage devtool the emulate the GCS server on your machine.

./godev/devtools/localstorage.sh
STORAGE_EMULATOR_HOST=localhost:8081 go run ./godev/cmd/worker --gcs

Environment Variables

NameDefaultDescription
GO_TELEMETRY_PROJECT_IDgo-telemetryGCP project ID
GO_TELEMETRY_LOCAL_STORAGE.localstorageDirectory for storage emulator I/O or file system storage
GO_TELEMETRY_UPLOAD_CONFIG../config/config.jsonLocation of the upload config used for report validation
GO_TELEMETRY_MAX_REQUEST_BYTES102400Maximum request body size the server allows
GO_TELEMETRY_ENVlocalDeployment environment (e.g. prod, dev, local, ... )

Testing

The telemetry.go.dev web site has a suite of regression tests that can be run with:

go test golang.org/x/telemetry/...

Deploying

Each time a CL is reviewed and submitted, the site is automatically deployed to Cloud Run. If it passes its serving-readiness checks, it will be automatically promoted to handle traffic.

If the automatic deployment is not working, or to check on the status of a pending deployment, see the “telemetrygodev” trigger in the Cloud Build history.

Test Instance

To deploy a test instance of this service, push to a branch and manually trigger the deploy job from the Cloud Build console with the desired values for branch and service name.