feat: Add anonymized telemetry to report product usage (#2273)

* feat: Add anonymized telemetry to report product usage

This adds a background service to report telemetry to a Coder
server for usage data. There will be realtime event data sent
in the future, but for now usage will report on a CRON.

* Fix flake and requested changes

* Add reporting options for setup

* Add reporting for workspaces

* Add resources as they are reported

* Track API key usage

* Ensure telemetry is tracked prior to exit
This commit is contained in:
Kyle Carberry
2022-06-17 00:26:40 -05:00
committed by GitHub
parent af8a1e3fea
commit 4cce969018
33 changed files with 1674 additions and 95 deletions

View File

@ -426,6 +426,11 @@ type ProvisionerJobLog struct {
Output string `db:"output" json:"output"`
}
type SiteConfig struct {
Key string `db:"key" json:"key"`
Value string `db:"value" json:"value"`
}
type Template struct {
ID uuid.UUID `db:"id" json:"id"`
CreatedAt time.Time `db:"created_at" json:"created_at"`