@oneuptime/common 10.2.11 → 10.2.12
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.
|
@@ -35,10 +35,20 @@ type TelemetryAttributesCacheEntry = {
|
|
|
35
35
|
|
|
36
36
|
export class TelemetryAttributeService {
|
|
37
37
|
private static readonly ATTRIBUTES_LIMIT: number = 5000;
|
|
38
|
-
private static readonly ROW_SCAN_LIMIT: number = 10000;
|
|
39
38
|
private static readonly CACHE_NAMESPACE: string = "telemetry-attributes";
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
/*
|
|
40
|
+
* Attribute keys change rarely. Cache for an hour so the (still O(seconds))
|
|
41
|
+
* ClickHouse scan only runs once per project per hour rather than on every
|
|
42
|
+
* dashboard / metrics-explorer load.
|
|
43
|
+
*/
|
|
44
|
+
private static readonly CACHE_STALE_AFTER_MINUTES: number = 60;
|
|
45
|
+
/*
|
|
46
|
+
* The previous 30-day window forced a 100M+ row scan with an in-CTE
|
|
47
|
+
* ORDER BY time DESC that pushed this query to 30-60s on busy projects.
|
|
48
|
+
* Attribute keys rotate slowly, so a 1-day window covers virtually every
|
|
49
|
+
* active key while keeping the scan tractable.
|
|
50
|
+
*/
|
|
51
|
+
private static readonly LOOKBACK_WINDOW_IN_DAYS: number = 1;
|
|
42
52
|
|
|
43
53
|
private getTelemetrySource(
|
|
44
54
|
telemetryType: TelemetryType,
|
|
@@ -247,76 +257,56 @@ export class TelemetryAttributeService {
|
|
|
247
257
|
TelemetryAttributeService.getLookbackStartDate();
|
|
248
258
|
|
|
249
259
|
/*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
* the
|
|
260
|
+
* Two notable choices here:
|
|
261
|
+
*
|
|
262
|
+
* 1. We aggregate with `groupUniqArrayArray` (or `mapKeys`+`groupUniqArray`
|
|
263
|
+
* for tables that lack the denormalized array column) instead of
|
|
264
|
+
* `arrayJoin` + outer `DISTINCT`. That avoids materializing one row
|
|
265
|
+
* per attribute key across millions of source rows.
|
|
266
|
+
*
|
|
267
|
+
* 2. The previous implementation wrapped the scan in
|
|
268
|
+
* `ORDER BY time DESC LIMIT 10000` to "cap" the work. With `arrayJoin`
|
|
269
|
+
* that LIMIT applied AFTER expansion so it didn't actually bound rows
|
|
270
|
+
* read, but it did force ClickHouse to sort every matching row by
|
|
271
|
+
* time — the dominant cost on busy projects. Bounded by lookback
|
|
272
|
+
* instead, the aggregate-and-flatten approach finishes in seconds.
|
|
254
273
|
*/
|
|
255
274
|
const statement: Statement = data.attributeKeysColumn
|
|
256
275
|
? SQL`
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
value: data.projectId,
|
|
269
|
-
}}
|
|
270
|
-
AND (
|
|
271
|
-
NOT empty(${data.attributeKeysColumn}) OR
|
|
272
|
-
NOT empty(${data.attributesColumn})
|
|
273
|
-
)
|
|
274
|
-
AND ${data.timeColumn} >= ${{
|
|
275
|
-
type: TableColumnType.Date,
|
|
276
|
-
value: lookbackStartDate,
|
|
277
|
-
}}`
|
|
276
|
+
SELECT arrayDistinct(arrayFlatten(groupUniqArrayArray(${data.attributeKeysColumn}))) AS keys
|
|
277
|
+
FROM ${data.tableName}
|
|
278
|
+
WHERE projectId = ${{
|
|
279
|
+
type: TableColumnType.ObjectID,
|
|
280
|
+
value: data.projectId,
|
|
281
|
+
}}
|
|
282
|
+
AND NOT empty(${data.attributeKeysColumn})
|
|
283
|
+
AND ${data.timeColumn} >= ${{
|
|
284
|
+
type: TableColumnType.Date,
|
|
285
|
+
value: lookbackStartDate,
|
|
286
|
+
}}`
|
|
278
287
|
: SQL`
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
}}`;
|
|
288
|
+
SELECT groupUniqArray(arrayJoin(mapKeys(${data.attributesColumn}))) AS keys
|
|
289
|
+
FROM ${data.tableName}
|
|
290
|
+
WHERE projectId = ${{
|
|
291
|
+
type: TableColumnType.ObjectID,
|
|
292
|
+
value: data.projectId,
|
|
293
|
+
}}
|
|
294
|
+
AND NOT empty(${data.attributesColumn})
|
|
295
|
+
AND ${data.timeColumn} >= ${{
|
|
296
|
+
type: TableColumnType.Date,
|
|
297
|
+
value: lookbackStartDate,
|
|
298
|
+
}}`;
|
|
291
299
|
|
|
292
300
|
if (data.metricName) {
|
|
293
301
|
statement.append(
|
|
294
302
|
SQL`
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
303
|
+
AND name = ${{
|
|
304
|
+
type: TableColumnType.Text,
|
|
305
|
+
value: data.metricName,
|
|
306
|
+
}}`,
|
|
299
307
|
);
|
|
300
308
|
}
|
|
301
309
|
|
|
302
|
-
statement.append(
|
|
303
|
-
SQL`
|
|
304
|
-
ORDER BY ${data.timeColumn} DESC
|
|
305
|
-
LIMIT ${{
|
|
306
|
-
type: TableColumnType.Number,
|
|
307
|
-
value: TelemetryAttributeService.ROW_SCAN_LIMIT,
|
|
308
|
-
}}
|
|
309
|
-
)
|
|
310
|
-
SELECT DISTINCT attribute
|
|
311
|
-
FROM filtered
|
|
312
|
-
WHERE attribute IS NOT NULL AND attribute != ''
|
|
313
|
-
ORDER BY attribute ASC
|
|
314
|
-
LIMIT ${{
|
|
315
|
-
type: TableColumnType.Number,
|
|
316
|
-
value: TelemetryAttributeService.ATTRIBUTES_LIMIT,
|
|
317
|
-
}}`,
|
|
318
|
-
);
|
|
319
|
-
|
|
320
310
|
return statement;
|
|
321
311
|
}
|
|
322
312
|
|
|
@@ -341,17 +331,29 @@ export class TelemetryAttributeService {
|
|
|
341
331
|
}>();
|
|
342
332
|
|
|
343
333
|
const rows: Array<JSONObject> = response.data || [];
|
|
334
|
+
const firstRow: JSONObject | undefined = rows[0];
|
|
335
|
+
const rawKeys: unknown = firstRow ? firstRow["keys"] : null;
|
|
344
336
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
337
|
+
if (!Array.isArray(rawKeys)) {
|
|
338
|
+
return [];
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
const attributeKeys: Array<string> = rawKeys
|
|
342
|
+
.map((attribute: unknown): string | null => {
|
|
348
343
|
return typeof attribute === "string" ? attribute.trim() : null;
|
|
349
344
|
})
|
|
350
345
|
.filter((attribute: string | null): attribute is string => {
|
|
351
346
|
return Boolean(attribute);
|
|
352
347
|
});
|
|
353
348
|
|
|
354
|
-
|
|
349
|
+
const distinctKeys: Array<string> = Array.from(new Set(attributeKeys));
|
|
350
|
+
distinctKeys.sort((a: string, b: string): number => {
|
|
351
|
+
return a.localeCompare(b);
|
|
352
|
+
});
|
|
353
|
+
if (distinctKeys.length > TelemetryAttributeService.ATTRIBUTES_LIMIT) {
|
|
354
|
+
distinctKeys.length = TelemetryAttributeService.ATTRIBUTES_LIMIT;
|
|
355
|
+
}
|
|
356
|
+
return distinctKeys;
|
|
355
357
|
}
|
|
356
358
|
|
|
357
359
|
private static readonly ATTRIBUTE_VALUES_LIMIT: number = 100;
|
|
@@ -144,69 +144,52 @@ export class TelemetryAttributeService {
|
|
|
144
144
|
static buildAttributesStatement(data) {
|
|
145
145
|
const lookbackStartDate = TelemetryAttributeService.getLookbackStartDate();
|
|
146
146
|
/*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
* the
|
|
147
|
+
* Two notable choices here:
|
|
148
|
+
*
|
|
149
|
+
* 1. We aggregate with `groupUniqArrayArray` (or `mapKeys`+`groupUniqArray`
|
|
150
|
+
* for tables that lack the denormalized array column) instead of
|
|
151
|
+
* `arrayJoin` + outer `DISTINCT`. That avoids materializing one row
|
|
152
|
+
* per attribute key across millions of source rows.
|
|
153
|
+
*
|
|
154
|
+
* 2. The previous implementation wrapped the scan in
|
|
155
|
+
* `ORDER BY time DESC LIMIT 10000` to "cap" the work. With `arrayJoin`
|
|
156
|
+
* that LIMIT applied AFTER expansion so it didn't actually bound rows
|
|
157
|
+
* read, but it did force ClickHouse to sort every matching row by
|
|
158
|
+
* time — the dominant cost on busy projects. Bounded by lookback
|
|
159
|
+
* instead, the aggregate-and-flatten approach finishes in seconds.
|
|
151
160
|
*/
|
|
152
161
|
const statement = data.attributeKeysColumn
|
|
153
162
|
? SQL `
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
empty(${data.attributeKeysColumn}),
|
|
158
|
-
mapKeys(${data.attributesColumn}),
|
|
159
|
-
${data.attributeKeysColumn}
|
|
160
|
-
)
|
|
161
|
-
) AS attribute
|
|
162
|
-
FROM ${data.tableName}
|
|
163
|
-
WHERE projectId = ${{
|
|
163
|
+
SELECT arrayDistinct(arrayFlatten(groupUniqArrayArray(${data.attributeKeysColumn}))) AS keys
|
|
164
|
+
FROM ${data.tableName}
|
|
165
|
+
WHERE projectId = ${{
|
|
164
166
|
type: TableColumnType.ObjectID,
|
|
165
167
|
value: data.projectId,
|
|
166
168
|
}}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
NOT empty(${data.attributesColumn})
|
|
170
|
-
)
|
|
171
|
-
AND ${data.timeColumn} >= ${{
|
|
169
|
+
AND NOT empty(${data.attributeKeysColumn})
|
|
170
|
+
AND ${data.timeColumn} >= ${{
|
|
172
171
|
type: TableColumnType.Date,
|
|
173
172
|
value: lookbackStartDate,
|
|
174
173
|
}}`
|
|
175
174
|
: SQL `
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
WHERE projectId = ${{
|
|
175
|
+
SELECT groupUniqArray(arrayJoin(mapKeys(${data.attributesColumn}))) AS keys
|
|
176
|
+
FROM ${data.tableName}
|
|
177
|
+
WHERE projectId = ${{
|
|
180
178
|
type: TableColumnType.ObjectID,
|
|
181
179
|
value: data.projectId,
|
|
182
180
|
}}
|
|
183
|
-
|
|
184
|
-
|
|
181
|
+
AND NOT empty(${data.attributesColumn})
|
|
182
|
+
AND ${data.timeColumn} >= ${{
|
|
185
183
|
type: TableColumnType.Date,
|
|
186
184
|
value: lookbackStartDate,
|
|
187
185
|
}}`;
|
|
188
186
|
if (data.metricName) {
|
|
189
187
|
statement.append(SQL `
|
|
190
|
-
|
|
188
|
+
AND name = ${{
|
|
191
189
|
type: TableColumnType.Text,
|
|
192
190
|
value: data.metricName,
|
|
193
191
|
}}`);
|
|
194
192
|
}
|
|
195
|
-
statement.append(SQL `
|
|
196
|
-
ORDER BY ${data.timeColumn} DESC
|
|
197
|
-
LIMIT ${{
|
|
198
|
-
type: TableColumnType.Number,
|
|
199
|
-
value: TelemetryAttributeService.ROW_SCAN_LIMIT,
|
|
200
|
-
}}
|
|
201
|
-
)
|
|
202
|
-
SELECT DISTINCT attribute
|
|
203
|
-
FROM filtered
|
|
204
|
-
WHERE attribute IS NOT NULL AND attribute != ''
|
|
205
|
-
ORDER BY attribute ASC
|
|
206
|
-
LIMIT ${{
|
|
207
|
-
type: TableColumnType.Number,
|
|
208
|
-
value: TelemetryAttributeService.ATTRIBUTES_LIMIT,
|
|
209
|
-
}}`);
|
|
210
193
|
return statement;
|
|
211
194
|
}
|
|
212
195
|
static async fetchAttributesFromDatabase(data) {
|
|
@@ -221,15 +204,26 @@ export class TelemetryAttributeService {
|
|
|
221
204
|
const dbResult = await data.source.service.executeQuery(statement);
|
|
222
205
|
const response = await dbResult.json();
|
|
223
206
|
const rows = response.data || [];
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
|
|
207
|
+
const firstRow = rows[0];
|
|
208
|
+
const rawKeys = firstRow ? firstRow["keys"] : null;
|
|
209
|
+
if (!Array.isArray(rawKeys)) {
|
|
210
|
+
return [];
|
|
211
|
+
}
|
|
212
|
+
const attributeKeys = rawKeys
|
|
213
|
+
.map((attribute) => {
|
|
227
214
|
return typeof attribute === "string" ? attribute.trim() : null;
|
|
228
215
|
})
|
|
229
216
|
.filter((attribute) => {
|
|
230
217
|
return Boolean(attribute);
|
|
231
218
|
});
|
|
232
|
-
|
|
219
|
+
const distinctKeys = Array.from(new Set(attributeKeys));
|
|
220
|
+
distinctKeys.sort((a, b) => {
|
|
221
|
+
return a.localeCompare(b);
|
|
222
|
+
});
|
|
223
|
+
if (distinctKeys.length > TelemetryAttributeService.ATTRIBUTES_LIMIT) {
|
|
224
|
+
distinctKeys.length = TelemetryAttributeService.ATTRIBUTES_LIMIT;
|
|
225
|
+
}
|
|
226
|
+
return distinctKeys;
|
|
233
227
|
}
|
|
234
228
|
async fetchAttributeValues(data) {
|
|
235
229
|
const source = this.getTelemetrySource(data.telemetryType);
|
|
@@ -290,10 +284,20 @@ export class TelemetryAttributeService {
|
|
|
290
284
|
}
|
|
291
285
|
}
|
|
292
286
|
TelemetryAttributeService.ATTRIBUTES_LIMIT = 5000;
|
|
293
|
-
TelemetryAttributeService.ROW_SCAN_LIMIT = 10000;
|
|
294
287
|
TelemetryAttributeService.CACHE_NAMESPACE = "telemetry-attributes";
|
|
295
|
-
|
|
296
|
-
|
|
288
|
+
/*
|
|
289
|
+
* Attribute keys change rarely. Cache for an hour so the (still O(seconds))
|
|
290
|
+
* ClickHouse scan only runs once per project per hour rather than on every
|
|
291
|
+
* dashboard / metrics-explorer load.
|
|
292
|
+
*/
|
|
293
|
+
TelemetryAttributeService.CACHE_STALE_AFTER_MINUTES = 60;
|
|
294
|
+
/*
|
|
295
|
+
* The previous 30-day window forced a 100M+ row scan with an in-CTE
|
|
296
|
+
* ORDER BY time DESC that pushed this query to 30-60s on busy projects.
|
|
297
|
+
* Attribute keys rotate slowly, so a 1-day window covers virtually every
|
|
298
|
+
* active key while keeping the scan tractable.
|
|
299
|
+
*/
|
|
300
|
+
TelemetryAttributeService.LOOKBACK_WINDOW_IN_DAYS = 1;
|
|
297
301
|
TelemetryAttributeService.ATTRIBUTE_VALUES_LIMIT = 100;
|
|
298
302
|
__decorate([
|
|
299
303
|
CaptureSpan(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TelemetryAttributeService.js","sourceRoot":"","sources":["../../../../Server/Services/TelemetryAttributeService.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,GAAG,EAAa,MAAM,sCAAsC,CAAC;AACtE,OAAO,aAAa,MAAM,qCAAqC,CAAC;AAChE,OAAO,kBAAkB,MAAM,cAAc,CAAC;AAC9C,OAAO,qBAAqB,MAAM,iBAAiB,CAAC;AACpD,OAAO,mBAAmB,MAAM,eAAe,CAAC;AAChD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,eAAe,MAAM,+CAA+C,CAAC;AAG5E,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,WAAW,MAAM,gCAAgC,CAAC;AAwBzD,MAAM,OAAO,yBAAyB;
|
|
1
|
+
{"version":3,"file":"TelemetryAttributeService.js","sourceRoot":"","sources":["../../../../Server/Services/TelemetryAttributeService.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,GAAG,EAAa,MAAM,sCAAsC,CAAC;AACtE,OAAO,aAAa,MAAM,qCAAqC,CAAC;AAChE,OAAO,kBAAkB,MAAM,cAAc,CAAC;AAC9C,OAAO,qBAAqB,MAAM,iBAAiB,CAAC;AACpD,OAAO,mBAAmB,MAAM,eAAe,CAAC;AAChD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,eAAe,MAAM,+CAA+C,CAAC;AAG5E,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,WAAW,MAAM,+BAA+B,CAAC;AACxD,OAAO,WAAW,MAAM,gCAAgC,CAAC;AAwBzD,MAAM,OAAO,yBAAyB;IAiB5B,kBAAkB,CACxB,aAA4B;QAE5B,QAAQ,aAAa,EAAE,CAAC;YACtB,KAAK,aAAa,CAA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