@@ -1143,6 +1143,16 @@ when required by your organization's security policy.`,
1143
1143
Group : & deploymentGroupEmailTLS ,
1144
1144
YAML : "certKeyFile" ,
1145
1145
}
1146
+ telemetryEnable := serpent.Option {
1147
+ Name : "Telemetry Enable" ,
1148
+ Description : "Whether telemetry is enabled or not. Coder collects anonymized usage data to help improve our product." ,
1149
+ Flag : "telemetry" ,
1150
+ Env : "CODER_TELEMETRY_ENABLE" ,
1151
+ Default : strconv .FormatBool (flag .Lookup ("test.v" ) == nil || os .Getenv ("CODER_TEST_TELEMETRY_DEFAULT_ENABLE" ) == "true" ),
1152
+ Value : & c .Telemetry .Enable ,
1153
+ Group : & deploymentGroupTelemetry ,
1154
+ YAML : "enable" ,
1155
+ }
1146
1156
opts := serpent.OptionSet {
1147
1157
{
1148
1158
Name : "Access URL" ,
@@ -1903,15 +1913,19 @@ when required by your organization's security policy.`,
1903
1913
YAML : "dangerousSkipIssuerChecks" ,
1904
1914
},
1905
1915
// Telemetry settings
1916
+ telemetryEnable ,
1906
1917
{
1907
- Name : "Telemetry Enable" ,
1908
- Description : "Whether telemetry is enabled or not. Coder collects anonymized usage data to help improve our product." ,
1909
- Flag : "telemetry" ,
1910
- Env : "CODER_TELEMETRY_ENABLE" ,
1911
- Default : strconv .FormatBool (flag .Lookup ("test.v" ) == nil ),
1912
- Value : & c .Telemetry .Enable ,
1913
- Group : & deploymentGroupTelemetry ,
1914
- YAML : "enable" ,
1918
+ Hidden : true ,
1919
+ Name : "Telemetry (backwards compatibility)" ,
1920
+ // Note the flip-flop of flag and env to maintain backwards
1921
+ // compatibility and consistency. Inconsistently, the env
1922
+ // was renamed to CODER_TELEMETRY_ENABLE in the past, but
1923
+ // the flag was not renamed -enable.
1924
+ Flag : "telemetry-enable" ,
1925
+ Env : "CODER_TELEMETRY" ,
1926
+ Value : & c .Telemetry .Enable ,
1927
+ Group : & deploymentGroupTelemetry ,
1928
+ UseInstead : []serpent.Option {telemetryEnable },
1915
1929
},
1916
1930
{
1917
1931
Name : "Telemetry URL" ,
0 commit comments