chore: add additional fields to license telemetry (#11173)

This sends the email the license was issued to, and whether or not it's a trial in the telemetry payload. It's a bit janky since the license parsing is all enterprise licensed.
This commit is contained in:
Colin Adler
2023-12-14 15:52:52 -06:00
committed by GitHub
parent 06394a5b8c
commit 4672700ef6
5 changed files with 41 additions and 3 deletions

View File

@ -174,6 +174,11 @@ type Options struct {
StatsBatcher *batchstats.Batcher
WorkspaceAppsStatsCollectorOptions workspaceapps.StatsCollectorOptions
// This janky function is used in telemetry to parse fields out of the raw
// JWT. It needs to be passed through like this because license parsing is
// under the enterprise license, and can't be imported into AGPL.
ParseLicenseClaims func(rawJWT string) (email string, trial bool, err error)
}
// @title Coder API