provide installMethod detail in server telemetry

pull/1/head
ansuz 3 years ago
parent a482d62553
commit f5e91ef3ef

@ -276,4 +276,13 @@ module.exports = {
* (false by default) * (false by default)
*/ */
verbose: false, verbose: false,
/* Surplus information:
*
* 'installMethod' is included in server telemetry to voluntarily
* indicate how many instances are using unofficial installation methods
* such as Docker.
*
*/
installMethod: 'unspecified',
}; };

@ -20,6 +20,7 @@ var canonicalizeOrigin = function (s) {
module.exports.create = function (config) { module.exports.create = function (config) {
const Env = { const Env = {
version: Package.version, version: Package.version,
installMethod: config.installMethod || undefined,
httpUnsafeOrigin: canonicalizeOrigin(config.httpUnsafeOrigin), httpUnsafeOrigin: canonicalizeOrigin(config.httpUnsafeOrigin),
httpSafeOrigin: canonicalizeOrigin(config.httpSafeOrigin), httpSafeOrigin: canonicalizeOrigin(config.httpSafeOrigin),

@ -4,6 +4,7 @@ const Stats = module.exports;
Stats.instanceData = function (Env) { Stats.instanceData = function (Env) {
var data = { var data = {
version: Env.version, version: Env.version,
installMethod: Env.installMethod,
domain: Env.myDomain, domain: Env.myDomain,
subdomain: Env.mySubdomain, subdomain: Env.mySubdomain,

Loading…
Cancel
Save