From f5e91ef3ef4c34c97178825c06fec2e81808d741 Mon Sep 17 00:00:00 2001 From: ansuz Date: Tue, 22 Jun 2021 16:16:32 +0530 Subject: [PATCH] provide installMethod detail in server telemetry --- config/config.example.js | 9 +++++++++ lib/env.js | 1 + lib/stats.js | 1 + 3 files changed, 11 insertions(+) diff --git a/config/config.example.js b/config/config.example.js index 69f0b1e91..96914fa92 100644 --- a/config/config.example.js +++ b/config/config.example.js @@ -276,4 +276,13 @@ module.exports = { * (false by default) */ 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', }; diff --git a/lib/env.js b/lib/env.js index 6f1717c09..6b033fa16 100644 --- a/lib/env.js +++ b/lib/env.js @@ -20,6 +20,7 @@ var canonicalizeOrigin = function (s) { module.exports.create = function (config) { const Env = { version: Package.version, + installMethod: config.installMethod || undefined, httpUnsafeOrigin: canonicalizeOrigin(config.httpUnsafeOrigin), httpSafeOrigin: canonicalizeOrigin(config.httpSafeOrigin), diff --git a/lib/stats.js b/lib/stats.js index d1da0e202..da820f7b8 100644 --- a/lib/stats.js +++ b/lib/stats.js @@ -4,6 +4,7 @@ const Stats = module.exports; Stats.instanceData = function (Env) { var data = { version: Env.version, + installMethod: Env.installMethod, domain: Env.myDomain, subdomain: Env.mySubdomain,