telemetry: expose Mode and SetMode

Gopls needs to be able to query and set the current telemetry mode.
Expose the Mode and SetMode APIs for this purpose.

For golang/go#62576

Change-Id: I1f9aa03595cfa1b60c88ebe8a560c5ac6a1b1b40
LUCI-TryBot-Result: Go LUCI <>
Reviewed-by: Peter Weinberger <>
2 files changed
tree: 3d93208f0741b63774786fcdd02868166f90b53f
  1. cmd/
  2. config/
  3. counter/
  4. godev/
  5. internal/
  6. upload/
  7. .dockerignore
  8. .eslintrc.json
  9. .gitignore
  10. .prettierrc.json
  11. .stylelintrc.json
  13. doc.go
  14. go.mod
  15. go.sum
  17. mode.go
  18. npm
  19. npx
  20. package-lock.json
  21. package.json
  24. tsconfig.json
  25. types.go

Go Telemetry

This repository holds the Go Telemetry server code and libraries.

Linting & Formatting

This repository uses eslint to format TS files, stylelint to format CSS files, and prettier to format TS, CSS, Markdown, and YAML files.

See the style guides:

It is encouraged that all TS and CSS code be run through formatters before submitting a change. However, it is not a strict requirement enforced by CI.

Installing npm Dependencies:

  1. Install docker
  2. Run ./npm install

Run ESLint, Stylelint, & Prettier

./npm run all

Report Issues / Send Patches

This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see

The main issue tracker for the time repository is located at Prefix your issue with “x/telemetry:” in the subject line, so it is easy to find.