@vendure/core 3.7.2-master-202607170305 → 3.7.2-master-202607180305
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/telemetry/collectors/config.collector.d.ts +19 -0
- package/dist/telemetry/collectors/config.collector.js +236 -0
- package/dist/telemetry/collectors/config.collector.js.map +1 -1
- package/dist/telemetry/collectors/database.collector.d.ts +27 -1
- package/dist/telemetry/collectors/database.collector.js +176 -11
- package/dist/telemetry/collectors/database.collector.js.map +1 -1
- package/dist/telemetry/collectors/features.collector.d.ts +1 -1
- package/dist/telemetry/collectors/features.collector.js +5 -2
- package/dist/telemetry/collectors/features.collector.js.map +1 -1
- package/dist/telemetry/collectors/system-info.collector.d.ts +11 -1
- package/dist/telemetry/collectors/system-info.collector.js +66 -1
- package/dist/telemetry/collectors/system-info.collector.js.map +1 -1
- package/dist/telemetry/telemetry.service.d.ts +27 -4
- package/dist/telemetry/telemetry.service.js +78 -14
- package/dist/telemetry/telemetry.service.js.map +1 -1
- package/dist/telemetry/telemetry.types.d.ts +74 -0
- package/package.json +2 -2
|
@@ -8,6 +8,25 @@ export declare class ConfigCollector {
|
|
|
8
8
|
private readonly configService;
|
|
9
9
|
constructor(configService: ConfigService);
|
|
10
10
|
collect(): TelemetryConfig;
|
|
11
|
+
private getApiIntrospectionEnabled;
|
|
12
|
+
private getApiPlaygroundEnabled;
|
|
13
|
+
private getApiDebugEnabled;
|
|
14
|
+
private getTrustProxyEnabled;
|
|
15
|
+
private getCorsWildcardOrigin;
|
|
16
|
+
private getTokenMethods;
|
|
17
|
+
private getRequireVerification;
|
|
18
|
+
private getAuthDisabled;
|
|
19
|
+
private getDefaultSuperadminCredentials;
|
|
20
|
+
private getCookieSecure;
|
|
21
|
+
private getCookieSameSite;
|
|
22
|
+
private getSettingsStoreFieldCount;
|
|
23
|
+
/**
|
|
24
|
+
* Compares the live strategy classes of each field against the default config
|
|
25
|
+
* and returns the dotted paths that differ. Emits paths only, never class
|
|
26
|
+
* names, so custom project vocabulary cannot leak.
|
|
27
|
+
*/
|
|
28
|
+
private getCustomizedStrategies;
|
|
29
|
+
private getStrategyNames;
|
|
11
30
|
private getDefaultLanguage;
|
|
12
31
|
private getAssetStorageType;
|
|
13
32
|
private getJobQueueType;
|
|
@@ -12,7 +12,53 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ConfigCollector = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const config_service_1 = require("../../config/config.service");
|
|
15
|
+
const default_config_1 = require("../../config/default-config");
|
|
15
16
|
const strategy_name_helper_1 = require("../helpers/strategy-name.helper");
|
|
17
|
+
/**
|
|
18
|
+
* VendureConfig fields whose live strategy classes are compared against
|
|
19
|
+
* `defaultConfig` to detect customization. Most are scalar strategies;
|
|
20
|
+
* activeOrderStrategy also supports an ordered array.
|
|
21
|
+
*/
|
|
22
|
+
const CUSTOMIZABLE_STRATEGY_PATHS = {
|
|
23
|
+
authOptions: [
|
|
24
|
+
'sessionCacheStrategy',
|
|
25
|
+
'passwordHashingStrategy',
|
|
26
|
+
'passwordValidationStrategy',
|
|
27
|
+
'verificationTokenStrategy',
|
|
28
|
+
'adminApiKeyStrategy',
|
|
29
|
+
'shopApiKeyStrategy',
|
|
30
|
+
'entityAccessControlStrategy',
|
|
31
|
+
'customerChannelAssignmentStrategy',
|
|
32
|
+
],
|
|
33
|
+
assetOptions: ['assetNamingStrategy', 'assetStorageStrategy', 'assetPreviewStrategy'],
|
|
34
|
+
catalogOptions: [
|
|
35
|
+
'productVariantPriceSelectionStrategy',
|
|
36
|
+
'productVariantPriceCalculationStrategy',
|
|
37
|
+
'productVariantPriceUpdateStrategy',
|
|
38
|
+
'stockDisplayStrategy',
|
|
39
|
+
'stockLocationStrategy',
|
|
40
|
+
],
|
|
41
|
+
orderOptions: [
|
|
42
|
+
'orderItemPriceCalculationStrategy',
|
|
43
|
+
'stockAllocationStrategy',
|
|
44
|
+
'mergeStrategy',
|
|
45
|
+
'checkoutMergeStrategy',
|
|
46
|
+
'orderCodeStrategy',
|
|
47
|
+
'orderByCodeAccessStrategy',
|
|
48
|
+
'changedPriceHandlingStrategy',
|
|
49
|
+
'orderLineDiscountDistributionStrategy',
|
|
50
|
+
'orderPlacedStrategy',
|
|
51
|
+
'activeOrderStrategy',
|
|
52
|
+
'orderSellerStrategy',
|
|
53
|
+
'guestCheckoutStrategy',
|
|
54
|
+
],
|
|
55
|
+
taxOptions: ['taxZoneStrategy', 'taxLineCalculationStrategy', 'orderTaxCalculationStrategy'],
|
|
56
|
+
entityOptions: ['entityIdStrategy', 'moneyStrategy', 'slugStrategy'],
|
|
57
|
+
importExportOptions: ['assetImportStrategy'],
|
|
58
|
+
jobQueueOptions: ['jobQueueStrategy', 'jobBufferStorageStrategy'],
|
|
59
|
+
schedulerOptions: ['schedulerStrategy'],
|
|
60
|
+
systemOptions: ['cacheStrategy', 'instrumentationStrategy'],
|
|
61
|
+
};
|
|
16
62
|
/**
|
|
17
63
|
* Collects configuration information for telemetry.
|
|
18
64
|
* Only collects strategy class names and non-sensitive configuration values.
|
|
@@ -45,8 +91,198 @@ let ConfigCollector = class ConfigCollector {
|
|
|
45
91
|
hasCustomOrderProcess: this.hasCustomOrderProcess(),
|
|
46
92
|
hasCustomPaymentProcess: this.hasCustomPaymentProcess(),
|
|
47
93
|
hasCustomFulfillmentProcess: this.hasCustomFulfillmentProcess(),
|
|
94
|
+
apiIntrospectionEnabled: this.getApiIntrospectionEnabled(),
|
|
95
|
+
apiPlaygroundEnabled: this.getApiPlaygroundEnabled(),
|
|
96
|
+
apiDebugEnabled: this.getApiDebugEnabled(),
|
|
97
|
+
trustProxyEnabled: this.getTrustProxyEnabled(),
|
|
98
|
+
corsWildcardOrigin: this.getCorsWildcardOrigin(),
|
|
99
|
+
tokenMethods: this.getTokenMethods(),
|
|
100
|
+
requireVerification: this.getRequireVerification(),
|
|
101
|
+
authDisabled: this.getAuthDisabled(),
|
|
102
|
+
defaultSuperadminCredentials: this.getDefaultSuperadminCredentials(),
|
|
103
|
+
cookieSecure: this.getCookieSecure(),
|
|
104
|
+
cookieSameSite: this.getCookieSameSite(),
|
|
105
|
+
settingsStoreFieldCount: this.getSettingsStoreFieldCount(),
|
|
106
|
+
customizedStrategies: this.getCustomizedStrategies(),
|
|
48
107
|
};
|
|
49
108
|
}
|
|
109
|
+
getApiIntrospectionEnabled() {
|
|
110
|
+
try {
|
|
111
|
+
// introspection defaults to true when not explicitly disabled
|
|
112
|
+
return this.configService.apiOptions.introspection !== false;
|
|
113
|
+
}
|
|
114
|
+
catch (_a) {
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
getApiPlaygroundEnabled() {
|
|
119
|
+
try {
|
|
120
|
+
const api = this.configService.apiOptions;
|
|
121
|
+
// adminApiPlayground/shopApiPlayground are deprecated, but reading them
|
|
122
|
+
// is intentional: telemetry on how many installations still enable the
|
|
123
|
+
// built-in playground is what tells us when it is safe to remove.
|
|
124
|
+
return !!(api.adminApiPlayground || api.shopApiPlayground); // NOSONAR
|
|
125
|
+
}
|
|
126
|
+
catch (_a) {
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
getApiDebugEnabled() {
|
|
131
|
+
try {
|
|
132
|
+
const api = this.configService.apiOptions;
|
|
133
|
+
return !!(api.adminApiDebug || api.shopApiDebug);
|
|
134
|
+
}
|
|
135
|
+
catch (_a) {
|
|
136
|
+
return undefined;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
getTrustProxyEnabled() {
|
|
140
|
+
try {
|
|
141
|
+
return !!this.configService.apiOptions.trustProxy;
|
|
142
|
+
}
|
|
143
|
+
catch (_a) {
|
|
144
|
+
return undefined;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
getCorsWildcardOrigin() {
|
|
148
|
+
try {
|
|
149
|
+
const cors = this.configService.apiOptions.cors;
|
|
150
|
+
if (!cors) {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
if (cors === true) {
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
const origin = cors.origin;
|
|
157
|
+
return origin === true || origin === '*';
|
|
158
|
+
}
|
|
159
|
+
catch (_a) {
|
|
160
|
+
return undefined;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
getTokenMethods() {
|
|
164
|
+
var _a;
|
|
165
|
+
try {
|
|
166
|
+
const tokenMethod = (_a = this.configService.authOptions.tokenMethod) !== null && _a !== void 0 ? _a : 'cookie';
|
|
167
|
+
const methods = Array.isArray(tokenMethod) ? tokenMethod : [tokenMethod];
|
|
168
|
+
return methods.slice(0, 5).map(method => String(method).slice(0, 16));
|
|
169
|
+
}
|
|
170
|
+
catch (_b) {
|
|
171
|
+
return undefined;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
getRequireVerification() {
|
|
175
|
+
try {
|
|
176
|
+
// requireVerification defaults to true
|
|
177
|
+
return this.configService.authOptions.requireVerification !== false;
|
|
178
|
+
}
|
|
179
|
+
catch (_a) {
|
|
180
|
+
return undefined;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
getAuthDisabled() {
|
|
184
|
+
try {
|
|
185
|
+
return !!this.configService.authOptions.disableAuth;
|
|
186
|
+
}
|
|
187
|
+
catch (_a) {
|
|
188
|
+
return undefined;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
getDefaultSuperadminCredentials() {
|
|
192
|
+
try {
|
|
193
|
+
// Compares against the well-known defaults only; the actual values
|
|
194
|
+
// are never read into the payload.
|
|
195
|
+
const credentials = this.configService.authOptions.superadminCredentials;
|
|
196
|
+
return (credentials === null || credentials === void 0 ? void 0 : credentials.identifier) === 'superadmin' && (credentials === null || credentials === void 0 ? void 0 : credentials.password) === 'superadmin';
|
|
197
|
+
}
|
|
198
|
+
catch (_a) {
|
|
199
|
+
return undefined;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
getCookieSecure() {
|
|
203
|
+
var _a;
|
|
204
|
+
try {
|
|
205
|
+
return ((_a = this.configService.authOptions.cookieOptions) === null || _a === void 0 ? void 0 : _a.secure) === true;
|
|
206
|
+
}
|
|
207
|
+
catch (_b) {
|
|
208
|
+
return undefined;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
getCookieSameSite() {
|
|
212
|
+
var _a;
|
|
213
|
+
try {
|
|
214
|
+
const sameSite = (_a = this.configService.authOptions.cookieOptions) === null || _a === void 0 ? void 0 : _a.sameSite;
|
|
215
|
+
return sameSite === undefined ? undefined : String(sameSite).slice(0, 16);
|
|
216
|
+
}
|
|
217
|
+
catch (_b) {
|
|
218
|
+
return undefined;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
getSettingsStoreFieldCount() {
|
|
222
|
+
try {
|
|
223
|
+
const fields = this.configService.settingsStoreFields;
|
|
224
|
+
return Object.values(fields).reduce((sum, namespaceFields) => sum + (Array.isArray(namespaceFields) ? namespaceFields.length : 0), 0);
|
|
225
|
+
}
|
|
226
|
+
catch (_a) {
|
|
227
|
+
return undefined;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Compares the live strategy classes of each field against the default config
|
|
232
|
+
* and returns the dotted paths that differ. Emits paths only, never class
|
|
233
|
+
* names, so custom project vocabulary cannot leak.
|
|
234
|
+
*/
|
|
235
|
+
getCustomizedStrategies() {
|
|
236
|
+
var _a, _b;
|
|
237
|
+
try {
|
|
238
|
+
const result = [];
|
|
239
|
+
for (const [optionsKey, fields] of Object.entries(CUSTOMIZABLE_STRATEGY_PATHS)) {
|
|
240
|
+
const liveOptions = this.configService[optionsKey];
|
|
241
|
+
const defaultOptions = default_config_1.defaultConfig[optionsKey];
|
|
242
|
+
const isEntityIdStrategy = optionsKey === 'entityOptions';
|
|
243
|
+
for (const field of fields) {
|
|
244
|
+
try {
|
|
245
|
+
// entityOptions.entityIdStrategy has a deprecated root-level
|
|
246
|
+
// fallback (mirrors getEntityIdStrategy); resolve both live
|
|
247
|
+
// and default the same way so a project using the deprecated
|
|
248
|
+
// field is still detected as customized. Reading the
|
|
249
|
+
// deprecated root-level field is intentional here.
|
|
250
|
+
const useRootFallback = isEntityIdStrategy && field === 'entityIdStrategy';
|
|
251
|
+
const liveStrategy = useRootFallback
|
|
252
|
+
? ((_a = liveOptions === null || liveOptions === void 0 ? void 0 : liveOptions[field]) !== null && _a !== void 0 ? _a : this.configService.entityIdStrategy) // NOSONAR
|
|
253
|
+
: liveOptions === null || liveOptions === void 0 ? void 0 : liveOptions[field];
|
|
254
|
+
const defaultStrategy = useRootFallback
|
|
255
|
+
? ((_b = defaultOptions === null || defaultOptions === void 0 ? void 0 : defaultOptions[field]) !== null && _b !== void 0 ? _b : default_config_1.defaultConfig.entityIdStrategy) // NOSONAR
|
|
256
|
+
: defaultOptions === null || defaultOptions === void 0 ? void 0 : defaultOptions[field];
|
|
257
|
+
if (liveStrategy == null || defaultStrategy == null) {
|
|
258
|
+
continue;
|
|
259
|
+
}
|
|
260
|
+
const liveNames = this.getStrategyNames(liveStrategy);
|
|
261
|
+
const defaultNames = this.getStrategyNames(defaultStrategy);
|
|
262
|
+
if (liveNames == null || defaultNames == null) {
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
if (liveNames.length !== defaultNames.length ||
|
|
266
|
+
liveNames.some((name, index) => name !== defaultNames[index])) {
|
|
267
|
+
result.push(`${optionsKey}.${field}`);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
catch (_c) {
|
|
271
|
+
// Skip this field on any per-field failure
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return result.slice(0, 64).map(path => path.slice(0, 64));
|
|
276
|
+
}
|
|
277
|
+
catch (_d) {
|
|
278
|
+
return undefined;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
getStrategyNames(strategy) {
|
|
282
|
+
const strategies = Array.isArray(strategy) ? strategy : [strategy];
|
|
283
|
+
const names = strategies.map(item => (0, strategy_name_helper_1.getStrategyName)(item));
|
|
284
|
+
return names.some(name => name === 'unknown') ? undefined : names;
|
|
285
|
+
}
|
|
50
286
|
getDefaultLanguage() {
|
|
51
287
|
try {
|
|
52
288
|
return this.configService.defaultLanguageCode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.collector.js","sourceRoot":"","sources":["../../../src/telemetry/collectors/config.collector.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,gEAA4D;AAC5D,0EAAkE;AAGlE;;;GAGG;AAEI,IAAM,eAAe,GAArB,MAAM,eAAe;IACxB,YAA6B,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAAG,CAAC;IAE7D,OAAO;QACH,MAAM,qBAAqB,GAAG,IAAI,CAAC,wBAAwB,EAAE,CAAC;QAC9D,MAAM,iBAAiB,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;QAC9F,OAAO;YACH,gBAAgB,EAAE,IAAI,CAAC,mBAAmB,EAAE;YAC5C,YAAY,EAAE,IAAI,CAAC,eAAe,EAAE;YACpC,gBAAgB,EAAE,IAAI,CAAC,mBAAmB,EAAE;YAC5C,eAAe,EAAE,IAAI,CAAC,kBAAkB,EAAE;YAC1C,iBAAiB;YACjB,qBAAqB,EAAE,IAAI,CAAC,wBAAwB,EAAE;YACtD,aAAa,EAAE,IAAI,CAAC,gBAAgB,EAAE;YACtC,aAAa,EAAE,IAAI,CAAC,gBAAgB,EAAE;YACtC,0BAA0B,EAAE,IAAI,CAAC,6BAA6B,EAAE;YAChE,mBAAmB,EAAE,IAAI,CAAC,sBAAsB,EAAE;YAClD,mBAAmB,EAAE,IAAI,CAAC,sBAAsB,EAAE;YAClD,uBA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I,CAAC,aAAa,CAAC,YAAY,CAAC,OAAO,0CAAE,MAAM,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACtE,CAAC;QAAC,WAAM,CAAC;YACL,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IAEO,uBAAuB;;QAC3B,IAAI,CAAC;YACD,OAAO,CAAC,MAAA,MAAA,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,OAAO,0CAAE,MAAM,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACxE,CAAC;QAAC,WAAM,CAAC;YACL,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;IAEO,2BAA2B;;QAC/B,IAAI,CAAC;YACD,OAAO,CAAC,MAAA,MAAA,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,OAAO,0CAAE,MAAM,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;QACzE,CAAC;QAAC,WAAM,CAAC;YACL,OAAO,KAAK,CAAC;QACjB,CAAC;IACL,CAAC;CACJ,CAAA;AAhNY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;qCAEmC,8BAAa;GADhD,eAAe,CAgN3B"}
|
|
1
|
+
{"version":3,"file":"config.collector.js","sourceRoot":"","sources":["../../../src/telemetry/collectors/config.collector.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,gEAA4D;AAC5D,gEAA4D;AAC5D,0EAAkE;AAGlE;;;;GAIG;AACH,MAAM,2BAA2B,GAA6B;IAC1D,WAAW,EAAE;QACT,sBAAsB;QACtB,yBAAyB;QACzB,4BAA4B;QAC5B,2BAA2B;QAC3B,qBAAqB;QACrB,oBAAoB;QACpB,6BAA6B;QAC7B,mCAAmC;KACtC;IACD,YAAY,EAAE,CAAC,qBAAqB,EAAE,sBAAsB,EAAE,sBAAsB,CAAC;IACrF,cAAc,EAAE;QACZ,sCAAsC;QACtC,wCAAwC;QACxC,mCAAmC;QACnC,sBAAsB;QACtB,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,CAAC;CACJ,CAAA;AA/YY,0CAAe;0BAAf,eAAe;IAD3B,IAAA,mBAAU,GAAE;qCAEmC,8BAAa;GADhD,eAAe,CA+Y3B"}
|
|
@@ -5,6 +5,13 @@ export interface DatabaseInfo {
|
|
|
5
5
|
databaseType: SupportedDatabaseType;
|
|
6
6
|
metrics: TelemetryEntityMetrics;
|
|
7
7
|
}
|
|
8
|
+
export interface DatabaseCollectionOptions {
|
|
9
|
+
/**
|
|
10
|
+
* Order lifecycle metrics require several filtered counts on the Order table.
|
|
11
|
+
* Keep them opt-in so startup telemetry and other callers avoid those scans.
|
|
12
|
+
*/
|
|
13
|
+
includeOrderMetrics?: boolean;
|
|
14
|
+
}
|
|
8
15
|
/**
|
|
9
16
|
* Collects database type and entity metrics for telemetry.
|
|
10
17
|
*/
|
|
@@ -12,9 +19,28 @@ export declare class DatabaseCollector {
|
|
|
12
19
|
private readonly configService;
|
|
13
20
|
private readonly connection;
|
|
14
21
|
constructor(configService: ConfigService, connection: TransactionalConnection);
|
|
15
|
-
collect(): Promise<DatabaseInfo>;
|
|
22
|
+
collect(options?: DatabaseCollectionOptions): Promise<DatabaseInfo>;
|
|
23
|
+
/**
|
|
24
|
+
* Collects order lifecycle metrics. Each field is resolved independently;
|
|
25
|
+
* any query failure leaves that field undefined and never throws. Returns
|
|
26
|
+
* undefined when no field could be resolved.
|
|
27
|
+
*/
|
|
28
|
+
private collectOrderMetrics;
|
|
29
|
+
private collectOrdersByType;
|
|
30
|
+
/**
|
|
31
|
+
* Collects internationalization breadth from the Channel table: the number
|
|
32
|
+
* of distinct language and currency codes across all channels (union of the
|
|
33
|
+
* default code and the available* simple-array columns).
|
|
34
|
+
*/
|
|
35
|
+
private collectI18nMetrics;
|
|
36
|
+
private safeBucket;
|
|
16
37
|
private getDatabaseType;
|
|
17
38
|
private collectEntityMetrics;
|
|
39
|
+
/**
|
|
40
|
+
* Counts a list of entities in bounded chunks to avoid saturating the
|
|
41
|
+
* connection pool during the daily heartbeat sweep.
|
|
42
|
+
*/
|
|
43
|
+
private countInChunks;
|
|
18
44
|
private safeCount;
|
|
19
45
|
private getCustomEntities;
|
|
20
46
|
}
|
|
@@ -11,10 +11,19 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.DatabaseCollector = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
|
+
const generated_types_1 = require("@vendure/common/lib/generated-types");
|
|
15
|
+
const typeorm_1 = require("typeorm");
|
|
14
16
|
const config_service_1 = require("../../config/config.service");
|
|
15
17
|
const transactional_connection_1 = require("../../connection/transactional-connection");
|
|
18
|
+
const channel_entity_1 = require("../../entity/channel/channel.entity");
|
|
16
19
|
const entities_1 = require("../../entity/entities");
|
|
20
|
+
const order_entity_1 = require("../../entity/order/order.entity");
|
|
17
21
|
const range_bucket_helper_1 = require("../helpers/range-bucket.helper");
|
|
22
|
+
const THIRTY_DAYS_MS = 30 * 24 * 60 * 60 * 1000;
|
|
23
|
+
// The daily heartbeat runs the entity-count sweep against a live production DB.
|
|
24
|
+
// Counting in bounded chunks (rather than one large Promise.all over ~50
|
|
25
|
+
// entities) avoids saturating the connection pool.
|
|
26
|
+
const ENTITY_COUNT_CHUNK_SIZE = 10;
|
|
18
27
|
/**
|
|
19
28
|
* Collects database type and entity metrics for telemetry.
|
|
20
29
|
*/
|
|
@@ -23,20 +32,149 @@ let DatabaseCollector = class DatabaseCollector {
|
|
|
23
32
|
this.configService = configService;
|
|
24
33
|
this.connection = connection;
|
|
25
34
|
}
|
|
26
|
-
async collect() {
|
|
35
|
+
async collect(options = {}) {
|
|
27
36
|
const databaseType = this.getDatabaseType();
|
|
28
37
|
let metrics;
|
|
38
|
+
let orderCountAvailable = false;
|
|
29
39
|
try {
|
|
30
|
-
|
|
40
|
+
const collected = await this.collectEntityMetrics();
|
|
41
|
+
metrics = collected.metrics;
|
|
42
|
+
orderCountAvailable = collected.orderCountAvailable;
|
|
31
43
|
}
|
|
32
44
|
catch (_a) {
|
|
33
45
|
metrics = { entities: {}, custom: { entityCount: 0 } };
|
|
34
46
|
}
|
|
47
|
+
// Order metrics are heartbeat-only and are skipped for large Order tables.
|
|
48
|
+
// The filtered active/state/type counts are not indexed, so this protects
|
|
49
|
+
// startup and high-volume installations from expensive full-table scans.
|
|
50
|
+
const shouldCollectOrderMetrics = options.includeOrderMetrics === true && orderCountAvailable && metrics.entities.Order !== '100k+';
|
|
51
|
+
const orders = shouldCollectOrderMetrics ? await this.collectOrderMetrics() : undefined;
|
|
52
|
+
// Keep DB work sequential to minimize peak load from telemetry collection.
|
|
53
|
+
const i18n = await this.collectI18nMetrics();
|
|
54
|
+
if (orders) {
|
|
55
|
+
metrics.orders = orders;
|
|
56
|
+
}
|
|
57
|
+
if (i18n) {
|
|
58
|
+
metrics.i18n = i18n;
|
|
59
|
+
}
|
|
35
60
|
return {
|
|
36
61
|
databaseType,
|
|
37
62
|
metrics,
|
|
38
63
|
};
|
|
39
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Collects order lifecycle metrics. Each field is resolved independently;
|
|
67
|
+
* any query failure leaves that field undefined and never throws. Returns
|
|
68
|
+
* undefined when no field could be resolved.
|
|
69
|
+
*/
|
|
70
|
+
async collectOrderMetrics() {
|
|
71
|
+
try {
|
|
72
|
+
const rawConnection = this.connection.rawConnection;
|
|
73
|
+
if (!(rawConnection === null || rawConnection === void 0 ? void 0 : rawConnection.isInitialized)) {
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
const repo = rawConnection.getRepository(order_entity_1.Order);
|
|
77
|
+
const since = new Date(Date.now() - THIRTY_DAYS_MS);
|
|
78
|
+
// Run one query at a time to avoid stacking several counts against the
|
|
79
|
+
// largest table in a production shop.
|
|
80
|
+
const placed = await this.safeBucket(() => repo.count({ where: { orderPlacedAt: (0, typeorm_1.Not)((0, typeorm_1.IsNull)()) } }));
|
|
81
|
+
const active = await this.safeBucket(() => repo.count({ where: { active: true } }));
|
|
82
|
+
const draft = await this.safeBucket(() => repo.count({ where: { state: 'Draft' } }));
|
|
83
|
+
const placedLast30d = await this.safeBucket(() => repo.count({ where: { orderPlacedAt: (0, typeorm_1.MoreThanOrEqual)(since) } }));
|
|
84
|
+
const byType = await this.collectOrdersByType(repo);
|
|
85
|
+
const orders = {};
|
|
86
|
+
if (placed)
|
|
87
|
+
orders.placed = placed;
|
|
88
|
+
if (active)
|
|
89
|
+
orders.active = active;
|
|
90
|
+
if (draft)
|
|
91
|
+
orders.draft = draft;
|
|
92
|
+
if (placedLast30d)
|
|
93
|
+
orders.placedLast30d = placedLast30d;
|
|
94
|
+
if (byType)
|
|
95
|
+
orders.byType = byType;
|
|
96
|
+
return Object.keys(orders).length > 0 ? orders : undefined;
|
|
97
|
+
}
|
|
98
|
+
catch (_a) {
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
async collectOrdersByType(repo) {
|
|
103
|
+
try {
|
|
104
|
+
const rows = await repo
|
|
105
|
+
.createQueryBuilder('o')
|
|
106
|
+
.select('o.type', 'type')
|
|
107
|
+
.addSelect('COUNT(*)', 'count')
|
|
108
|
+
.groupBy('o.type')
|
|
109
|
+
.getRawMany();
|
|
110
|
+
// Order.type is a plain varchar column, so allowlist against the
|
|
111
|
+
// known OrderType enum values — never emit arbitrary strings that a
|
|
112
|
+
// plugin or manual data fix might have written into the column.
|
|
113
|
+
const allowedTypes = new Set(Object.values(generated_types_1.OrderType));
|
|
114
|
+
const result = {};
|
|
115
|
+
for (const row of rows) {
|
|
116
|
+
const type = String(row.type);
|
|
117
|
+
const count = Number(row.count);
|
|
118
|
+
if (allowedTypes.has(type) && count > 0) {
|
|
119
|
+
result[type] = (0, range_bucket_helper_1.toRangeBucket)(count);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return Object.keys(result).length > 0 ? result : undefined;
|
|
123
|
+
}
|
|
124
|
+
catch (_a) {
|
|
125
|
+
return undefined;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Collects internationalization breadth from the Channel table: the number
|
|
130
|
+
* of distinct language and currency codes across all channels (union of the
|
|
131
|
+
* default code and the available* simple-array columns).
|
|
132
|
+
*/
|
|
133
|
+
async collectI18nMetrics() {
|
|
134
|
+
var _a, _b;
|
|
135
|
+
try {
|
|
136
|
+
const rawConnection = this.connection.rawConnection;
|
|
137
|
+
if (!(rawConnection === null || rawConnection === void 0 ? void 0 : rawConnection.isInitialized)) {
|
|
138
|
+
return undefined;
|
|
139
|
+
}
|
|
140
|
+
const channels = await rawConnection.getRepository(channel_entity_1.Channel).find({
|
|
141
|
+
select: [
|
|
142
|
+
'defaultLanguageCode',
|
|
143
|
+
'availableLanguageCodes',
|
|
144
|
+
'defaultCurrencyCode',
|
|
145
|
+
'availableCurrencyCodes',
|
|
146
|
+
],
|
|
147
|
+
});
|
|
148
|
+
const languages = new Set();
|
|
149
|
+
const currencies = new Set();
|
|
150
|
+
for (const channel of channels) {
|
|
151
|
+
if (channel.defaultLanguageCode) {
|
|
152
|
+
languages.add(channel.defaultLanguageCode);
|
|
153
|
+
}
|
|
154
|
+
for (const code of (_a = channel.availableLanguageCodes) !== null && _a !== void 0 ? _a : []) {
|
|
155
|
+
languages.add(code);
|
|
156
|
+
}
|
|
157
|
+
if (channel.defaultCurrencyCode) {
|
|
158
|
+
currencies.add(channel.defaultCurrencyCode);
|
|
159
|
+
}
|
|
160
|
+
for (const code of (_b = channel.availableCurrencyCodes) !== null && _b !== void 0 ? _b : []) {
|
|
161
|
+
currencies.add(code);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return { languages: languages.size, currencies: currencies.size };
|
|
165
|
+
}
|
|
166
|
+
catch (_c) {
|
|
167
|
+
return undefined;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
async safeBucket(count) {
|
|
171
|
+
try {
|
|
172
|
+
return (0, range_bucket_helper_1.toRangeBucket)(await count());
|
|
173
|
+
}
|
|
174
|
+
catch (_a) {
|
|
175
|
+
return undefined;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
40
178
|
getDatabaseType() {
|
|
41
179
|
const dbType = this.configService.dbConnectionOptions.type;
|
|
42
180
|
if (dbType === 'better-sqlite3' || dbType === 'sqlite') {
|
|
@@ -51,38 +189,65 @@ let DatabaseCollector = class DatabaseCollector {
|
|
|
51
189
|
// Check if connection is ready before attempting to collect metrics
|
|
52
190
|
const rawConnection = this.connection.rawConnection;
|
|
53
191
|
if (!(rawConnection === null || rawConnection === void 0 ? void 0 : rawConnection.isInitialized)) {
|
|
54
|
-
return {
|
|
192
|
+
return {
|
|
193
|
+
metrics: { entities: {}, custom: { entityCount: 0 } },
|
|
194
|
+
orderCountAvailable: false,
|
|
195
|
+
};
|
|
55
196
|
}
|
|
56
197
|
const coreEntityEntries = Object.entries(entities_1.coreEntitiesMap);
|
|
57
|
-
const counts = await
|
|
198
|
+
const counts = await this.countInChunks(coreEntityEntries.map(([, entity]) => entity));
|
|
199
|
+
const orderIndex = coreEntityEntries.findIndex(([name]) => name === 'Order');
|
|
58
200
|
const entities = {};
|
|
59
201
|
coreEntityEntries.forEach(([name], index) => {
|
|
60
|
-
|
|
202
|
+
const count = counts[index];
|
|
203
|
+
if (count !== undefined) {
|
|
204
|
+
entities[name] = (0, range_bucket_helper_1.toRangeBucket)(count);
|
|
205
|
+
}
|
|
61
206
|
});
|
|
62
207
|
const customEntities = this.getCustomEntities();
|
|
63
208
|
const customEntityCount = customEntities.length;
|
|
64
209
|
// Only count custom entity records if there are custom entities
|
|
65
210
|
let totalCustomRecords;
|
|
66
211
|
if (customEntityCount > 0) {
|
|
67
|
-
const customCounts = await
|
|
68
|
-
|
|
212
|
+
const customCounts = await this.countInChunks(customEntities);
|
|
213
|
+
if (customCounts.every((count) => count !== undefined)) {
|
|
214
|
+
totalCustomRecords = customCounts.reduce((sum, count) => sum + count, 0);
|
|
215
|
+
}
|
|
69
216
|
}
|
|
70
217
|
return {
|
|
71
|
-
|
|
72
|
-
|
|
218
|
+
metrics: {
|
|
219
|
+
entities,
|
|
220
|
+
custom: Object.assign({ entityCount: customEntityCount }, (totalCustomRecords !== undefined && {
|
|
221
|
+
totalRecords: (0, range_bucket_helper_1.toRangeBucket)(totalCustomRecords),
|
|
222
|
+
})),
|
|
223
|
+
},
|
|
224
|
+
orderCountAvailable: orderIndex !== -1 && counts[orderIndex] !== undefined,
|
|
73
225
|
};
|
|
74
226
|
}
|
|
227
|
+
/**
|
|
228
|
+
* Counts a list of entities in bounded chunks to avoid saturating the
|
|
229
|
+
* connection pool during the daily heartbeat sweep.
|
|
230
|
+
*/
|
|
231
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
232
|
+
async countInChunks(entities) {
|
|
233
|
+
const counts = [];
|
|
234
|
+
for (let i = 0; i < entities.length; i += ENTITY_COUNT_CHUNK_SIZE) {
|
|
235
|
+
const chunk = entities.slice(i, i + ENTITY_COUNT_CHUNK_SIZE);
|
|
236
|
+
counts.push(...(await Promise.all(chunk.map(entity => this.safeCount(entity)))));
|
|
237
|
+
}
|
|
238
|
+
return counts;
|
|
239
|
+
}
|
|
75
240
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
76
241
|
async safeCount(entity) {
|
|
77
242
|
try {
|
|
78
243
|
const rawConnection = this.connection.rawConnection;
|
|
79
244
|
if (!(rawConnection === null || rawConnection === void 0 ? void 0 : rawConnection.isInitialized)) {
|
|
80
|
-
return
|
|
245
|
+
return undefined;
|
|
81
246
|
}
|
|
82
247
|
return await rawConnection.getRepository(entity).count();
|
|
83
248
|
}
|
|
84
249
|
catch (_a) {
|
|
85
|
-
return
|
|
250
|
+
return undefined;
|
|
86
251
|
}
|
|
87
252
|
}
|
|
88
253
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.collector.js","sourceRoot":"","sources":["../../../src/telemetry/collectors/database.collector.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;
|
|
1
|
+
{"version":3,"file":"database.collector.js","sourceRoot":"","sources":["../../../src/telemetry/collectors/database.collector.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,yEAAgE;AAChE,qCAAwE;AAExE,gEAA4D;AAC5D,wFAAoF;AACpF,wEAA8D;AAC9D,oDAAwD;AACxD,kEAAwD;AACxD,wEAA+D;AAS/D,MAAM,cAAc,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAChD,gFAAgF;AAChF,yEAAyE;AACzE,mDAAmD;AACnD,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAoBnC;;GAEG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC1B,YACqB,aAA4B,EAC5B,UAAmC;QADnC,kBAAa,GAAb,aAAa,CAAe;QAC5B,eAAU,GAAV,UAAU,CAAyB;IACrD,CAAC;IAEJ,KAAK,CAAC,OAAO,CAAC,UAAqC,EAAE;QACjD,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAC5C,IAAI,OAA+B,CAAC;QACpC,IAAI,mBAAmB,GAAG,KAAK,CAAC;QAEhC,IAAI,CAAC;YACD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;YACpD,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;YAC5B,mBAAmB,GAAG,SAAS,CAAC,mBAAmB,CAAC;QACxD,CAAC;QAAC,WAAM,CAAC;YACL,OAAO,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3D,CAAC;QAED,2EAA2E;QAC3E,0EAA0E;QAC1E,yEAAyE;QACzE,MAAM,yBAAyB,GAC3B,OAAO,CAAC,mBAAmB,KAAK,IAAI,IAAI,mBAAmB,IAAI,OAAO,CAAC,Q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AiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAG2B,8BAAa;QAChB,kDAAuB;GAH/C,iBAAiB,CAwQ7B"}
|
|
@@ -12,7 +12,7 @@ import { TelemetryConfig, TelemetryFeatures } from '../telemetry.types';
|
|
|
12
12
|
export declare class FeaturesCollector {
|
|
13
13
|
private readonly connection;
|
|
14
14
|
constructor(connection: TransactionalConnection);
|
|
15
|
-
collect(config: TelemetryConfig): Promise<TelemetryFeatures>;
|
|
15
|
+
collect(config: TelemetryConfig, currencyCount?: number): Promise<TelemetryFeatures>;
|
|
16
16
|
/**
|
|
17
17
|
* Derives multiVendor from seller count + strategy name.
|
|
18
18
|
* When DB is unavailable, returns `undefined` to stay consistent
|
|
@@ -29,7 +29,7 @@ let FeaturesCollector = class FeaturesCollector {
|
|
|
29
29
|
constructor(connection) {
|
|
30
30
|
this.connection = connection;
|
|
31
31
|
}
|
|
32
|
-
async collect(config) {
|
|
32
|
+
async collect(config, currencyCount) {
|
|
33
33
|
var _a, _b;
|
|
34
34
|
const rawConnection = this.connection.rawConnection;
|
|
35
35
|
const dbReady = rawConnection === null || rawConnection === void 0 ? void 0 : rawConnection.isInitialized;
|
|
@@ -48,6 +48,8 @@ let FeaturesCollector = class FeaturesCollector {
|
|
|
48
48
|
// Derived from already-collected config — no duplicate iteration
|
|
49
49
|
customFieldsInUse: ((_a = config.customFieldsCount) !== null && _a !== void 0 ? _a : 0) > 0,
|
|
50
50
|
scheduledTasks: ((_b = config.scheduledTaskCount) !== null && _b !== void 0 ? _b : 0) > 0,
|
|
51
|
+
// Derived from the already-collected i18n currency count — no duplicate query
|
|
52
|
+
multiCurrency: currencyCount === undefined ? undefined : currencyCount > 1,
|
|
51
53
|
};
|
|
52
54
|
}
|
|
53
55
|
/**
|
|
@@ -70,8 +72,9 @@ let FeaturesCollector = class FeaturesCollector {
|
|
|
70
72
|
return undefined;
|
|
71
73
|
}
|
|
72
74
|
}
|
|
75
|
+
async safeCount(dbReady,
|
|
73
76
|
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
74
|
-
|
|
77
|
+
entity, map) {
|
|
75
78
|
try {
|
|
76
79
|
if (!dbReady)
|
|
77
80
|
return undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features.collector.js","sourceRoot":"","sources":["../../../src/telemetry/collectors/features.collector.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,wFAAoF;AACpF,wEAA6D;AAC7D,wEAA8D;AAC9D,qEAA2D;AAC3D,6FAAkF;AAGlF;;;;;;;;GAQG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC1B,YAA6B,UAAmC;QAAnC,eAAU,GAAV,UAAU,CAAyB;IAAG,CAAC;IAEpE,KAAK,CAAC,OAAO,CAAC,MAAuB;;
|
|
1
|
+
{"version":3,"file":"features.collector.js","sourceRoot":"","sources":["../../../src/telemetry/collectors/features.collector.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAE5C,wFAAoF;AACpF,wEAA6D;AAC7D,wEAA8D;AAC9D,qEAA2D;AAC3D,6FAAkF;AAGlF;;;;;;;;GAQG;AAEI,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;IAC1B,YAA6B,UAAmC;QAAnC,eAAU,GAAV,UAAU,CAAyB;IAAG,CAAC;IAEpE,KAAK,CAAC,OAAO,CAAC,MAAuB,EAAE,aAAsB;;QACzD,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;QACpD,MAAM,OAAO,GAAG,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,aAAa,CAAC;QAE7C,wDAAwD;QACxD,MAAM,CAAC,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,cAAc,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;YACtF,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,wBAAO,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK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QACrB,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,SAAS,CACnB,OAA4B;IAC5B,wDAAwD;IACxD,MAAgB,EAChB,GAAyB;QAEzB,IAAI,CAAC;YACD,IAAI,CAAC,OAAO;gBAAE,OAAO,SAAS,CAAC;YAC/B,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,CAAC;YAChF,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC;QACtB,CAAC;QAAC,WAAM,CAAC;YACL,OAAO,SAAS,CAAC;QACrB,CAAC;IACL,CAAC;CACJ,CAAA;AAjEY,8CAAiB;4BAAjB,iBAAiB;IAD7B,IAAA,mBAAU,GAAE;qCAEgC,kDAAuB;GADvD,iBAAiB,CAiE7B"}
|
|
@@ -1,10 +1,20 @@
|
|
|
1
|
+
import { TelemetryRuntime } from '../telemetry.types';
|
|
1
2
|
export interface SystemInfo {
|
|
2
3
|
nodeVersion: string;
|
|
3
4
|
platform: string;
|
|
5
|
+
runtime: TelemetryRuntime;
|
|
4
6
|
}
|
|
5
7
|
/**
|
|
6
|
-
* Collects basic system information for telemetry.
|
|
8
|
+
* Collects basic system and runtime information for telemetry.
|
|
9
|
+
* Each runtime sub-field is resolved independently so that a single
|
|
10
|
+
* failure never prevents the others from being reported.
|
|
7
11
|
*/
|
|
8
12
|
export declare class SystemInfoCollector {
|
|
9
13
|
collect(): SystemInfo;
|
|
14
|
+
private collectRuntime;
|
|
15
|
+
private getRuntimeType;
|
|
16
|
+
private getPackageManager;
|
|
17
|
+
private getTsNode;
|
|
18
|
+
private getCpuCount;
|
|
19
|
+
private getTotalMemoryGb;
|
|
10
20
|
}
|
|
@@ -13,15 +13,80 @@ exports.SystemInfoCollector = void 0;
|
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const node_os_1 = __importDefault(require("node:os"));
|
|
15
15
|
/**
|
|
16
|
-
* Collects basic system information for telemetry.
|
|
16
|
+
* Collects basic system and runtime information for telemetry.
|
|
17
|
+
* Each runtime sub-field is resolved independently so that a single
|
|
18
|
+
* failure never prevents the others from being reported.
|
|
17
19
|
*/
|
|
18
20
|
let SystemInfoCollector = class SystemInfoCollector {
|
|
19
21
|
collect() {
|
|
20
22
|
return {
|
|
21
23
|
nodeVersion: process.version,
|
|
22
24
|
platform: `${node_os_1.default.platform()} ${node_os_1.default.arch()}`,
|
|
25
|
+
runtime: this.collectRuntime(),
|
|
23
26
|
};
|
|
24
27
|
}
|
|
28
|
+
collectRuntime() {
|
|
29
|
+
return {
|
|
30
|
+
runtimeType: this.getRuntimeType(),
|
|
31
|
+
packageManager: this.getPackageManager(),
|
|
32
|
+
tsNode: this.getTsNode(),
|
|
33
|
+
cpuCount: this.getCpuCount(),
|
|
34
|
+
totalMemoryGb: this.getTotalMemoryGb(),
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
getRuntimeType() {
|
|
38
|
+
try {
|
|
39
|
+
if (process.versions.bun) {
|
|
40
|
+
return 'bun';
|
|
41
|
+
}
|
|
42
|
+
if (process.versions.deno) {
|
|
43
|
+
return 'deno';
|
|
44
|
+
}
|
|
45
|
+
return 'node';
|
|
46
|
+
}
|
|
47
|
+
catch (_a) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
getPackageManager() {
|
|
52
|
+
var _a, _b;
|
|
53
|
+
try {
|
|
54
|
+
// Mirrors the parsing in packages/create/src/helpers.ts
|
|
55
|
+
const name = (_b = (_a = process.env.npm_config_user_agent) === null || _a === void 0 ? void 0 : _a.split(' ')[0]) === null || _b === void 0 ? void 0 : _b.split('/')[0];
|
|
56
|
+
if (name === 'npm' || name === 'pnpm' || name === 'yarn' || name === 'bun') {
|
|
57
|
+
return name;
|
|
58
|
+
}
|
|
59
|
+
return 'unknown';
|
|
60
|
+
}
|
|
61
|
+
catch (_c) {
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
getTsNode() {
|
|
66
|
+
try {
|
|
67
|
+
return !!process[Symbol.for('ts-node.register.instance')];
|
|
68
|
+
}
|
|
69
|
+
catch (_a) {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
getCpuCount() {
|
|
74
|
+
try {
|
|
75
|
+
const count = node_os_1.default.cpus().length;
|
|
76
|
+
return count > 0 ? count : undefined;
|
|
77
|
+
}
|
|
78
|
+
catch (_a) {
|
|
79
|
+
return undefined;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
getTotalMemoryGb() {
|
|
83
|
+
try {
|
|
84
|
+
return Math.round(node_os_1.default.totalmem() / 2 ** 30);
|
|
85
|
+
}
|
|
86
|
+
catch (_a) {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
25
90
|
};
|
|
26
91
|
exports.SystemInfoCollector = SystemInfoCollector;
|
|
27
92
|
exports.SystemInfoCollector = SystemInfoCollector = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-info.collector.js","sourceRoot":"","sources":["../../../src/telemetry/collectors/system-info.collector.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,sDAAyB;
|
|
1
|
+
{"version":3,"file":"system-info.collector.js","sourceRoot":"","sources":["../../../src/telemetry/collectors/system-info.collector.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,sDAAyB;AAUzB;;;;GAIG;AAEI,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC5B,OAAO;QACH,OAAO;YACH,WAAW,EAAE,OAAO,CAAC,OAAO;YAC5B,QAAQ,EAAE,GAAG,iBAAE,CAAC,QAAQ,EAAE,IAAI,iBAAE,CAAC,IAAI,EAAE,EAAE;YACzC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE;SACjC,CAAC;IACN,CAAC;IAEO,cAAc;QAClB,OAAO;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D,MAAM,KAAK,GAAG,iBAAE,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC;YAC/B,OAAO,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;QACzC,CAAC;QAAC,WAAM,CAAC;YACL,OAAO,SAAS,CAAC;QACrB,CAAC;IACL,CAAC;IAEO,gBAAgB;QACpB,IAAI,CAAC;YACD,OAAO,IAAI,CAAC,KAAK,CAAC,iBAAE,CAAC,QAAQ,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;QAC/C,CAAC;QAAC,WAAM,CAAC;YACL,OAAO,SAAS,CAAC;QACrB,CAAC;IACL,CAAC;CACJ,CAAA;AAtEY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;GACA,mBAAmB,CAsE/B"}
|
|
@@ -9,15 +9,28 @@ import { PluginCollector } from './collectors/plugin.collector';
|
|
|
9
9
|
import { SystemInfoCollector } from './collectors/system-info.collector';
|
|
10
10
|
/**
|
|
11
11
|
* @description
|
|
12
|
-
* The TelemetryService collects anonymous usage data
|
|
13
|
-
*
|
|
12
|
+
* The TelemetryService collects anonymous usage data from Vendure applications and
|
|
13
|
+
* sends it to the Vendure telemetry endpoint. This data helps the Vendure team
|
|
14
14
|
* understand how the framework is being used and prioritize development efforts.
|
|
15
15
|
*
|
|
16
|
+
* **Timing:**
|
|
17
|
+
* An initial event is sent shortly after startup, and a further "heartbeat" event
|
|
18
|
+
* is then sent roughly every 24 hours for as long as the server is running.
|
|
19
|
+
*
|
|
20
|
+
* **What is collected:**
|
|
21
|
+
* Version and runtime information (Vendure/Node versions, platform, JS runtime,
|
|
22
|
+
* package manager, CPU/memory shape), database type, plugin package names (custom
|
|
23
|
+
* plugin names are never collected), range-bucketed entity counts including order
|
|
24
|
+
* lifecycle and internationalization breadth, deployment/cloud detection, and a
|
|
25
|
+
* configuration summary reduced to booleans, enums and strategy/customization
|
|
26
|
+
* indicators. See the Telemetry guide for the full, authoritative list.
|
|
27
|
+
*
|
|
16
28
|
* **Privacy guarantees:**
|
|
17
29
|
* - Installation ID is a random UUID, not derived from any system information
|
|
18
30
|
* - Custom plugin names are NOT collected (only count)
|
|
19
31
|
* - Entity counts use ranges, not exact numbers
|
|
20
|
-
* - No PII (no hostnames, IPs, user data)
|
|
32
|
+
* - No PII (no hostnames, IPs, user data), secrets, credentials or file paths are collected
|
|
33
|
+
* - Custom strategy class names are never sent (only the config paths that were customized)
|
|
21
34
|
* - All failures are silently ignored
|
|
22
35
|
*
|
|
23
36
|
* **Opt-out:**
|
|
@@ -39,11 +52,21 @@ export declare class TelemetryService implements OnApplicationBootstrap, OnAppli
|
|
|
39
52
|
private readonly deploymentCollector;
|
|
40
53
|
private readonly featuresCollector;
|
|
41
54
|
private delayTimeout;
|
|
55
|
+
private heartbeatTimeout;
|
|
56
|
+
private hasBootstrapped;
|
|
42
57
|
constructor(processContext: ProcessContext, installationIdCollector: InstallationIdCollector, systemInfoCollector: SystemInfoCollector, databaseCollector: DatabaseCollector, pluginCollector: PluginCollector, configCollector: ConfigCollector, deploymentCollector: DeploymentCollector, featuresCollector: FeaturesCollector);
|
|
43
58
|
onApplicationBootstrap(): void;
|
|
44
59
|
onApplicationShutdown(): void;
|
|
45
60
|
/**
|
|
46
|
-
*
|
|
61
|
+
* Schedules the next heartbeat send roughly 24 hours out, with random jitter
|
|
62
|
+
* so that co-restarted servers desynchronize. The timer reschedules itself
|
|
63
|
+
* after firing, is unref'ed so it never keeps the process alive, and is
|
|
64
|
+
* cleared on shutdown.
|
|
65
|
+
*/
|
|
66
|
+
private scheduleHeartbeat;
|
|
67
|
+
/**
|
|
68
|
+
* Collects and sends telemetry data. Guards are re-checked on every send so
|
|
69
|
+
* they apply to both the startup send and each heartbeat.
|
|
47
70
|
*/
|
|
48
71
|
private sendTelemetry;
|
|
49
72
|
/**
|
|
@@ -23,17 +23,37 @@ const system_info_collector_1 = require("./collectors/system-info.collector");
|
|
|
23
23
|
const is_telemetry_disabled_helper_1 = require("./helpers/is-telemetry-disabled.helper");
|
|
24
24
|
const TELEMETRY_ENDPOINT = 'https://telemetry.vendure.io/api/v1/collect';
|
|
25
25
|
const TELEMETRY_TIMEOUT_MS = 5000;
|
|
26
|
+
const TELEMETRY_SCHEMA_VERSION = 2;
|
|
27
|
+
const STARTUP_DELAY_MS = 5000;
|
|
28
|
+
const HEARTBEAT_INTERVAL_MS = 24 * 60 * 60 * 1000;
|
|
29
|
+
// Up to one hour of random jitter is added to each heartbeat delay so that a
|
|
30
|
+
// fleet of servers restarted together does not fire their daily heartbeats at
|
|
31
|
+
// the same instant (which would spike load on the telemetry endpoint).
|
|
32
|
+
const HEARTBEAT_MAX_JITTER_MS = 60 * 60 * 1000;
|
|
26
33
|
/**
|
|
27
34
|
* @description
|
|
28
|
-
* The TelemetryService collects anonymous usage data
|
|
29
|
-
*
|
|
35
|
+
* The TelemetryService collects anonymous usage data from Vendure applications and
|
|
36
|
+
* sends it to the Vendure telemetry endpoint. This data helps the Vendure team
|
|
30
37
|
* understand how the framework is being used and prioritize development efforts.
|
|
31
38
|
*
|
|
39
|
+
* **Timing:**
|
|
40
|
+
* An initial event is sent shortly after startup, and a further "heartbeat" event
|
|
41
|
+
* is then sent roughly every 24 hours for as long as the server is running.
|
|
42
|
+
*
|
|
43
|
+
* **What is collected:**
|
|
44
|
+
* Version and runtime information (Vendure/Node versions, platform, JS runtime,
|
|
45
|
+
* package manager, CPU/memory shape), database type, plugin package names (custom
|
|
46
|
+
* plugin names are never collected), range-bucketed entity counts including order
|
|
47
|
+
* lifecycle and internationalization breadth, deployment/cloud detection, and a
|
|
48
|
+
* configuration summary reduced to booleans, enums and strategy/customization
|
|
49
|
+
* indicators. See the Telemetry guide for the full, authoritative list.
|
|
50
|
+
*
|
|
32
51
|
* **Privacy guarantees:**
|
|
33
52
|
* - Installation ID is a random UUID, not derived from any system information
|
|
34
53
|
* - Custom plugin names are NOT collected (only count)
|
|
35
54
|
* - Entity counts use ranges, not exact numbers
|
|
36
|
-
* - No PII (no hostnames, IPs, user data)
|
|
55
|
+
* - No PII (no hostnames, IPs, user data), secrets, credentials or file paths are collected
|
|
56
|
+
* - Custom strategy class names are never sent (only the config paths that were customized)
|
|
37
57
|
* - All failures are silently ignored
|
|
38
58
|
*
|
|
39
59
|
* **Opt-out:**
|
|
@@ -55,8 +75,12 @@ let TelemetryService = class TelemetryService {
|
|
|
55
75
|
this.configCollector = configCollector;
|
|
56
76
|
this.deploymentCollector = deploymentCollector;
|
|
57
77
|
this.featuresCollector = featuresCollector;
|
|
78
|
+
this.hasBootstrapped = false;
|
|
58
79
|
}
|
|
59
80
|
onApplicationBootstrap() {
|
|
81
|
+
if (this.hasBootstrapped) {
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
60
84
|
// Skip if worker process - only run from server
|
|
61
85
|
if (this.processContext.isWorker) {
|
|
62
86
|
return;
|
|
@@ -65,36 +89,71 @@ let TelemetryService = class TelemetryService {
|
|
|
65
89
|
if ((0, is_telemetry_disabled_helper_1.isTelemetryDisabled)()) {
|
|
66
90
|
return;
|
|
67
91
|
}
|
|
92
|
+
this.hasBootstrapped = true;
|
|
68
93
|
// Delay telemetry collection to allow user bootstrap code to complete
|
|
69
94
|
// This ensures JobQueueService.start() has been called (if it will be)
|
|
70
95
|
// before we check worker mode
|
|
71
96
|
this.delayTimeout = setTimeout(() => {
|
|
72
97
|
this.delayTimeout = undefined;
|
|
73
|
-
this.sendTelemetry().catch(() => {
|
|
98
|
+
this.sendTelemetry('startup').catch(() => {
|
|
74
99
|
// Silently ignore all errors
|
|
75
100
|
});
|
|
76
|
-
|
|
101
|
+
this.scheduleHeartbeat();
|
|
102
|
+
}, STARTUP_DELAY_MS);
|
|
77
103
|
}
|
|
78
104
|
onApplicationShutdown() {
|
|
79
105
|
if (this.delayTimeout) {
|
|
80
106
|
clearTimeout(this.delayTimeout);
|
|
81
107
|
this.delayTimeout = undefined;
|
|
82
108
|
}
|
|
109
|
+
if (this.heartbeatTimeout) {
|
|
110
|
+
clearTimeout(this.heartbeatTimeout);
|
|
111
|
+
this.heartbeatTimeout = undefined;
|
|
112
|
+
}
|
|
113
|
+
this.hasBootstrapped = false;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Schedules the next heartbeat send roughly 24 hours out, with random jitter
|
|
117
|
+
* so that co-restarted servers desynchronize. The timer reschedules itself
|
|
118
|
+
* after firing, is unref'ed so it never keeps the process alive, and is
|
|
119
|
+
* cleared on shutdown.
|
|
120
|
+
*/
|
|
121
|
+
scheduleHeartbeat() {
|
|
122
|
+
var _a, _b;
|
|
123
|
+
// This jitter only spreads background telemetry load; it has no security purpose.
|
|
124
|
+
const jitter = Math.floor(Math.random() * HEARTBEAT_MAX_JITTER_MS); // NOSONAR
|
|
125
|
+
const delay = HEARTBEAT_INTERVAL_MS + jitter;
|
|
126
|
+
this.heartbeatTimeout = setTimeout(() => {
|
|
127
|
+
this.heartbeatTimeout = undefined;
|
|
128
|
+
this.sendTelemetry('heartbeat').catch(() => {
|
|
129
|
+
// Silently ignore all errors
|
|
130
|
+
});
|
|
131
|
+
this.scheduleHeartbeat();
|
|
132
|
+
}, delay);
|
|
133
|
+
(_b = (_a = this.heartbeatTimeout).unref) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
83
134
|
}
|
|
84
135
|
/**
|
|
85
|
-
* Collects and sends telemetry data.
|
|
136
|
+
* Collects and sends telemetry data. Guards are re-checked on every send so
|
|
137
|
+
* they apply to both the startup send and each heartbeat.
|
|
86
138
|
*/
|
|
87
|
-
async sendTelemetry() {
|
|
88
|
-
|
|
139
|
+
async sendTelemetry(sendReason) {
|
|
140
|
+
if (this.processContext.isWorker || (0, is_telemetry_disabled_helper_1.isTelemetryDisabled)()) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const payload = await this.collectPayload(sendReason);
|
|
89
144
|
await this.send(payload);
|
|
90
145
|
}
|
|
91
146
|
/**
|
|
92
147
|
* Collects all telemetry data from the various collectors.
|
|
93
148
|
*/
|
|
94
|
-
async collectPayload() {
|
|
95
|
-
var _a, _b, _c, _d, _e;
|
|
149
|
+
async collectPayload(sendReason) {
|
|
150
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
151
|
+
// Both collectors may access the database. Keep them sequential so the
|
|
152
|
+
// telemetry sweep does not increase peak database concurrency.
|
|
96
153
|
const installationId = await this.installationIdCollector.collect();
|
|
97
|
-
const databaseInfo = await this.databaseCollector.collect(
|
|
154
|
+
const databaseInfo = await this.databaseCollector.collect({
|
|
155
|
+
includeOrderMetrics: sendReason === 'heartbeat',
|
|
156
|
+
});
|
|
98
157
|
const systemInfo = this.systemInfoCollector.collect();
|
|
99
158
|
const plugins = this.pluginCollector.collect();
|
|
100
159
|
const collectedConfig = this.configCollector.collect();
|
|
@@ -103,19 +162,24 @@ let TelemetryService = class TelemetryService {
|
|
|
103
162
|
// into a new object to avoid mutating the collector's return value
|
|
104
163
|
const entities = (_b = (_a = databaseInfo.metrics) === null || _a === void 0 ? void 0 : _a.entities) !== null && _b !== void 0 ? _b : {};
|
|
105
164
|
const config = Object.assign(Object.assign({}, collectedConfig), { channelCount: (_c = entities.Channel) !== null && _c !== void 0 ? _c : collectedConfig.channelCount, paymentMethodCount: (_d = entities.PaymentMethod) !== null && _d !== void 0 ? _d : collectedConfig.paymentMethodCount, shippingMethodCount: (_e = entities.ShippingMethod) !== null && _e !== void 0 ? _e : collectedConfig.shippingMethodCount });
|
|
106
|
-
// FeaturesCollector derives flags from already-collected config
|
|
107
|
-
// to avoid duplicating
|
|
108
|
-
|
|
165
|
+
// FeaturesCollector derives flags from already-collected config and the
|
|
166
|
+
// already-collected i18n currency count to avoid duplicating iteration
|
|
167
|
+
// or querying logic
|
|
168
|
+
const features = await this.featuresCollector.collect(config, (_g = (_f = databaseInfo.metrics) === null || _f === void 0 ? void 0 : _f.i18n) === null || _g === void 0 ? void 0 : _g.currencies);
|
|
109
169
|
return {
|
|
110
170
|
// Required fields
|
|
171
|
+
schemaVersion: TELEMETRY_SCHEMA_VERSION,
|
|
111
172
|
installationId,
|
|
112
173
|
timestamp: new Date().toISOString(),
|
|
113
174
|
vendureVersion: version_1.VENDURE_VERSION,
|
|
114
175
|
nodeVersion: systemInfo.nodeVersion,
|
|
115
176
|
databaseType: databaseInfo.databaseType,
|
|
116
177
|
// Optional fields
|
|
178
|
+
sendReason,
|
|
179
|
+
uptimeSeconds: Math.floor(process.uptime()),
|
|
117
180
|
environment: process.env.NODE_ENV,
|
|
118
181
|
platform: systemInfo.platform,
|
|
182
|
+
runtime: systemInfo.runtime,
|
|
119
183
|
plugins,
|
|
120
184
|
metrics: databaseInfo.metrics,
|
|
121
185
|
deployment,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetry.service.js","sourceRoot":"","sources":["../../src/telemetry/telemetry.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA2F;AAE3F,wEAAoE;AACpE,wCAA6C;AAE7C,oEAAgE;AAChE,wEAAoE;AACpE,4EAAwE;AACxE,wEAAoE;AACpE,sFAAiF;AACjF,oEAAgE;AAChE,8EAAyE;AACzE,yFAA6E;AAG7E,MAAM,kBAAkB,GAAG,6CAA6C,CAAC;AACzE,MAAM,oBAAoB,GAAG,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"telemetry.service.js","sourceRoot":"","sources":["../../src/telemetry/telemetry.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA2F;AAE3F,wEAAoE;AACpE,wCAA6C;AAE7C,oEAAgE;AAChE,wEAAoE;AACpE,4EAAwE;AACxE,wEAAoE;AACpE,sFAAiF;AACjF,oEAAgE;AAChE,8EAAyE;AACzE,yFAA6E;AAG7E,MAAM,kBAAkB,GAAG,6CAA6C,CAAC;AACzE,MAAM,oBAAoB,GAAG,IAAI,CAAC;AAClC,MAAM,wBAAwB,GAAG,CAAC,CAAC;AACnC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AA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uB;QAC3B,2CAAmB;QACrB,sCAAiB;QACnB,kCAAe;QACf,kCAAe;QACX,0CAAmB;QACrB,sCAAiB;GAbhD,gBAAgB,CAqK5B"}
|
|
@@ -3,6 +3,27 @@ import { DataSourceOptions } from 'typeorm';
|
|
|
3
3
|
* Range buckets for anonymizing entity counts
|
|
4
4
|
*/
|
|
5
5
|
export type RangeBucket = '0' | '1-100' | '101-1k' | '1k-10k' | '10k-100k' | '100k+';
|
|
6
|
+
/**
|
|
7
|
+
* Reason a telemetry event was sent. `startup` is the single send shortly after
|
|
8
|
+
* bootstrap; `heartbeat` is the repeating daily send.
|
|
9
|
+
*/
|
|
10
|
+
export type SendReason = 'startup' | 'heartbeat';
|
|
11
|
+
/**
|
|
12
|
+
* Runtime environment information (engine, package manager, hardware shape).
|
|
13
|
+
* All fields are best-effort — any that cannot be resolved are omitted.
|
|
14
|
+
*/
|
|
15
|
+
export interface TelemetryRuntime {
|
|
16
|
+
/** JavaScript runtime executing the process */
|
|
17
|
+
runtimeType?: 'node' | 'bun' | 'deno';
|
|
18
|
+
/** Package manager that launched the process, parsed from npm_config_user_agent */
|
|
19
|
+
packageManager?: 'npm' | 'pnpm' | 'yarn' | 'bun' | 'unknown';
|
|
20
|
+
/** Whether the process is running under ts-node */
|
|
21
|
+
tsNode?: boolean;
|
|
22
|
+
/** Number of logical CPUs */
|
|
23
|
+
cpuCount?: number;
|
|
24
|
+
/** Total system memory rounded to whole gigabytes */
|
|
25
|
+
totalMemoryGb?: number;
|
|
26
|
+
}
|
|
6
27
|
/**
|
|
7
28
|
* Supported database types for Vendure telemetry.
|
|
8
29
|
* Derived from TypeORM's DataSourceOptions for type safety.
|
|
@@ -33,6 +54,35 @@ export interface TelemetryEntityMetrics {
|
|
|
33
54
|
entityCount: number;
|
|
34
55
|
totalRecords?: RangeBucket;
|
|
35
56
|
};
|
|
57
|
+
/** Order lifecycle breakdown (range-bucketed counts) */
|
|
58
|
+
orders?: TelemetryOrderMetrics;
|
|
59
|
+
/** Internationalization breadth derived from the Channel table */
|
|
60
|
+
i18n?: TelemetryI18nMetrics;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Internationalization breadth derived from the Channel table.
|
|
64
|
+
*/
|
|
65
|
+
export interface TelemetryI18nMetrics {
|
|
66
|
+
/** Distinct language codes across all channels */
|
|
67
|
+
languages?: number;
|
|
68
|
+
/** Distinct currency codes across all channels */
|
|
69
|
+
currencies?: number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Order lifecycle metrics using range buckets for privacy. Every field is
|
|
73
|
+
* independent — a single failed query leaves that field undefined.
|
|
74
|
+
*/
|
|
75
|
+
export interface TelemetryOrderMetrics {
|
|
76
|
+
/** Orders where orderPlacedAt is not null */
|
|
77
|
+
placed?: RangeBucket;
|
|
78
|
+
/** Orders where active = true */
|
|
79
|
+
active?: RangeBucket;
|
|
80
|
+
/** Orders in the Draft state */
|
|
81
|
+
draft?: RangeBucket;
|
|
82
|
+
/** Orders placed within the last 30 days */
|
|
83
|
+
placedLast30d?: RangeBucket;
|
|
84
|
+
/** Order counts keyed by OrderType (only types with count > 0) */
|
|
85
|
+
byType?: Record<string, RangeBucket>;
|
|
36
86
|
}
|
|
37
87
|
/**
|
|
38
88
|
* Deployment environment information
|
|
@@ -70,6 +120,24 @@ export interface TelemetryConfig {
|
|
|
70
120
|
hasCustomOrderProcess?: boolean;
|
|
71
121
|
hasCustomPaymentProcess?: boolean;
|
|
72
122
|
hasCustomFulfillmentProcess?: boolean;
|
|
123
|
+
apiIntrospectionEnabled?: boolean;
|
|
124
|
+
apiPlaygroundEnabled?: boolean;
|
|
125
|
+
apiDebugEnabled?: boolean;
|
|
126
|
+
trustProxyEnabled?: boolean;
|
|
127
|
+
corsWildcardOrigin?: boolean;
|
|
128
|
+
tokenMethods?: string[];
|
|
129
|
+
requireVerification?: boolean;
|
|
130
|
+
authDisabled?: boolean;
|
|
131
|
+
/** True when superadmin identifier and password are both left at the 'superadmin' default */
|
|
132
|
+
defaultSuperadminCredentials?: boolean;
|
|
133
|
+
cookieSecure?: boolean;
|
|
134
|
+
cookieSameSite?: string;
|
|
135
|
+
settingsStoreFieldCount?: number;
|
|
136
|
+
/**
|
|
137
|
+
* Dotted VendureConfig paths of single-strategy fields whose live strategy
|
|
138
|
+
* class differs from the default config. Paths only — never class names.
|
|
139
|
+
*/
|
|
140
|
+
customizedStrategies?: string[];
|
|
73
141
|
}
|
|
74
142
|
/**
|
|
75
143
|
* Feature adoption flags derived from entity counts and configuration.
|
|
@@ -89,18 +157,24 @@ export interface TelemetryFeatures {
|
|
|
89
157
|
customFieldsInUse?: boolean;
|
|
90
158
|
/** Scheduled tasks configured beyond defaults */
|
|
91
159
|
scheduledTasks?: boolean;
|
|
160
|
+
/** More than one distinct currency configured across channels */
|
|
161
|
+
multiCurrency?: boolean;
|
|
92
162
|
}
|
|
93
163
|
/**
|
|
94
164
|
* Full telemetry payload sent to the collection endpoint
|
|
95
165
|
*/
|
|
96
166
|
export interface TelemetryPayload {
|
|
167
|
+
schemaVersion: number;
|
|
97
168
|
installationId: string;
|
|
98
169
|
timestamp: string;
|
|
99
170
|
vendureVersion: string;
|
|
100
171
|
nodeVersion: string;
|
|
101
172
|
databaseType: SupportedDatabaseType;
|
|
173
|
+
sendReason?: SendReason;
|
|
174
|
+
uptimeSeconds?: number;
|
|
102
175
|
environment?: string;
|
|
103
176
|
platform?: string;
|
|
177
|
+
runtime?: TelemetryRuntime;
|
|
104
178
|
plugins?: TelemetryPluginInfo;
|
|
105
179
|
metrics?: TelemetryEntityMetrics;
|
|
106
180
|
deployment?: TelemetryDeployment;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendure/core",
|
|
3
|
-
"version": "3.7.2-master-
|
|
3
|
+
"version": "3.7.2-master-202607180305",
|
|
4
4
|
"description": "A modern, headless ecommerce framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@nestjs/platform-express": "^11.0.12",
|
|
50
50
|
"@nestjs/typeorm": "^11.0.0",
|
|
51
51
|
"@types/express": "^5.0.1",
|
|
52
|
-
"@vendure/common": "^3.7.2-master-
|
|
52
|
+
"@vendure/common": "^3.7.2-master-202607180305",
|
|
53
53
|
"bcrypt": "^6.0.0",
|
|
54
54
|
"cookie-session": "^2.1.0",
|
|
55
55
|
"cron-time-generator": "^2.0.3",
|