@@ -230,6 +230,13 @@ func (r *remoteReporter) deployment() error {
230
230
if sysInfo .Containerized != nil {
231
231
containerized = * sysInfo .Containerized
232
232
}
233
+
234
+ // Tracks where Coder was installed from!
235
+ installSource := os .Getenv ("CODER_TELEMETRY_INSTALL_SOURCE" )
236
+ if installSource != "" && installSource != "aws_marketplace" {
237
+ return xerrors .Errorf ("invalid installce source: %s" , installSource )
238
+ }
239
+
233
240
data , err := json .Marshal (& Deployment {
234
241
ID : r .options .DeploymentID ,
235
242
Architecture : sysInfo .Architecture ,
@@ -243,6 +250,7 @@ func (r *remoteReporter) deployment() error {
243
250
OIDCAuth : r .options .OIDCAuth ,
244
251
OIDCIssuerURL : r .options .OIDCIssuerURL ,
245
252
Prometheus : r .options .Prometheus ,
253
+ InstallSource : installSource ,
246
254
STUN : r .options .STUN ,
247
255
Tunnel : r .options .Tunnel ,
248
256
OSType : sysInfo .OS .Type ,
@@ -677,6 +685,7 @@ type Deployment struct {
677
685
OIDCAuth bool `json:"oidc_auth"`
678
686
OIDCIssuerURL string `json:"oidc_issuer_url"`
679
687
Prometheus bool `json:"prometheus"`
688
+ InstallSource string `json:"install_source"`
680
689
STUN bool `json:"stun"`
681
690
OSType string `json:"os_type"`
682
691
OSFamily string `json:"os_family"`
0 commit comments