From 98b6c8bcb0ee786741c4cbbd0e7456267d4639c0 Mon Sep 17 00:00:00 2001 From: Ammar Bandukwala Date: Fri, 13 Oct 2023 11:43:06 -0500 Subject: [PATCH] chore(coderd): report full license in telemetry (#10258) Will aid in cross-referencing deployments to sales accounts. --- coderd/telemetry/telemetry.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/coderd/telemetry/telemetry.go b/coderd/telemetry/telemetry.go index 4cbdc46e28..6c2b3eb78b 100644 --- a/coderd/telemetry/telemetry.go +++ b/coderd/telemetry/telemetry.go @@ -673,9 +673,13 @@ func ConvertTemplateVersion(version database.TemplateVersion) TemplateVersion { return snapVersion } -// ConvertLicense anonymizes a license. func ConvertLicense(license database.License) License { + // License is intentionally not anonymized because it's + // deployment-wide, and we already have an index of all issued + // licenses. return License{ + JWT: license.JWT, + Exp: license.Exp, UploadedAt: license.UploadedAt, UUID: license.UUID, } @@ -877,15 +881,10 @@ type ProvisionerJob struct { Type database.ProvisionerJobType `json:"type"` } -type ParameterSchema struct { - ID uuid.UUID `json:"id"` - JobID uuid.UUID `json:"job_id"` - Name string `json:"name"` - ValidationCondition string `json:"validation_condition"` -} - type License struct { + JWT string `json:"jwt"` UploadedAt time.Time `json:"uploaded_at"` + Exp time.Time `json:"exp"` UUID uuid.UUID `json:"uuid"` }