@localstack/appinspector-ui 1.0.211 → 1.0.213
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/index.cjs +48 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +106 -79
- package/dist/index.js.map +1 -1
- package/dist/spans-worker.js +18 -14
- package/package.json +1 -1
package/dist/spans-worker.js
CHANGED
|
@@ -313,10 +313,12 @@
|
|
|
313
313
|
}
|
|
314
314
|
return left.startTime.localeCompare(right.startTime, "en");
|
|
315
315
|
};
|
|
316
|
-
var countFacet = (
|
|
317
|
-
|
|
316
|
+
var countFacet = (requests, value, rootSpanId) => {
|
|
317
|
+
const set = requests.get(value);
|
|
318
|
+
if (set) set.add(rootSpanId);
|
|
319
|
+
else requests.set(value, /* @__PURE__ */ new Set([rootSpanId]));
|
|
318
320
|
};
|
|
319
|
-
var toFacetValues = (
|
|
321
|
+
var toFacetValues = (requests) => [...requests].map(([value, set]) => ({ count: set.size, value })).toSorted((left, right) => left.value.localeCompare(right.value));
|
|
320
322
|
var createSpansReducer = ({ now = Date.now, orphanGraceMs = 0 } = {}) => {
|
|
321
323
|
const corpus = /* @__PURE__ */ new Map();
|
|
322
324
|
let parsedQuery = parseQuery("");
|
|
@@ -420,16 +422,18 @@
|
|
|
420
422
|
const clients = /* @__PURE__ */ new Map();
|
|
421
423
|
const issues = /* @__PURE__ */ new Map();
|
|
422
424
|
for (const entry of entries) {
|
|
423
|
-
|
|
425
|
+
const row = rows[entry.spanId];
|
|
426
|
+
if (!row) continue;
|
|
427
|
+
if (row.matches) allIds.push(entry.spanId);
|
|
424
428
|
if (excluding && matchesExclusion(entry, parsedQuery)) excludedCount++;
|
|
425
|
-
countFacet(producers, entry.producer);
|
|
426
|
-
countFacet(services, entry.serviceName);
|
|
427
|
-
countFacet(regions, entry.region);
|
|
428
|
-
countFacet(accounts, entry.accountId);
|
|
429
|
-
countFacet(clients, entry.triggerKind);
|
|
430
|
-
if (entry.error) countFacet(issues, "error");
|
|
431
|
-
if (entry.warning) countFacet(issues, "warning");
|
|
432
|
-
if (!entry.error && !entry.warning) countFacet(issues, "ok");
|
|
429
|
+
countFacet(producers, entry.producer, row.rootSpanId);
|
|
430
|
+
countFacet(services, entry.serviceName, row.rootSpanId);
|
|
431
|
+
countFacet(regions, entry.region, row.rootSpanId);
|
|
432
|
+
countFacet(accounts, entry.accountId, row.rootSpanId);
|
|
433
|
+
countFacet(clients, entry.triggerKind, row.rootSpanId);
|
|
434
|
+
if (entry.error) countFacet(issues, "error", row.rootSpanId);
|
|
435
|
+
if (entry.warning) countFacet(issues, "warning", row.rootSpanId);
|
|
436
|
+
if (!entry.error && !entry.warning) countFacet(issues, "ok", row.rootSpanId);
|
|
433
437
|
}
|
|
434
438
|
return {
|
|
435
439
|
allIds: allIds.toReversed(),
|
|
@@ -437,7 +441,7 @@
|
|
|
437
441
|
facets: {
|
|
438
442
|
account: toFacetValues(accounts),
|
|
439
443
|
client: toFacetValues(clients),
|
|
440
|
-
issues: ["error", "warning", "ok"].map((value) => ({ count: issues.get(value) ?? 0, value })),
|
|
444
|
+
issues: ["error", "warning", "ok"].map((value) => ({ count: issues.get(value)?.size ?? 0, value })),
|
|
441
445
|
producer: toFacetValues(producers),
|
|
442
446
|
region: toFacetValues(regions),
|
|
443
447
|
service: toFacetValues(services)
|
|
@@ -445,7 +449,7 @@
|
|
|
445
449
|
queryActive,
|
|
446
450
|
rows,
|
|
447
451
|
topLevelIds: topLevelIds.toReversed(),
|
|
448
|
-
totalCount:
|
|
452
|
+
totalCount: topLevel.length
|
|
449
453
|
};
|
|
450
454
|
};
|
|
451
455
|
return {
|