@jeffjassky/telemetry 0.7.0 → 0.8.1
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 +186 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +186 -6
- package/dist/index.js.map +1 -1
- package/dist/mcp.cjs +26 -1
- package/dist/mcp.cjs.map +1 -1
- package/dist/mcp.js +26 -1
- package/dist/mcp.js.map +1 -1
- package/dist/ui/_assets/{index-BksXA5iG.js → index-GvGDQ08Z.js} +2 -2
- package/dist/ui/_assets/index-GvGDQ08Z.js.map +1 -0
- package/dist/ui/index.html +1 -1
- package/package.json +15 -5
- package/types/index.d.ts +45 -0
- package/dist/ui/_assets/index-BksXA5iG.js.map +0 -1
package/dist/mcp.js
CHANGED
|
@@ -323,6 +323,31 @@ var BREAKDOWN_FIELDS = [
|
|
|
323
323
|
"error.type",
|
|
324
324
|
"error.handled"
|
|
325
325
|
];
|
|
326
|
+
var GENERIC_SUBJECT_TYPES = ["anon", "session"];
|
|
327
|
+
var mostSpecificSubject = {
|
|
328
|
+
$let: {
|
|
329
|
+
vars: { keys: { $ifNull: ["$subjectKeys", []] } },
|
|
330
|
+
in: {
|
|
331
|
+
$ifNull: [
|
|
332
|
+
{
|
|
333
|
+
$arrayElemAt: [
|
|
334
|
+
{
|
|
335
|
+
$filter: {
|
|
336
|
+
input: "$$keys",
|
|
337
|
+
as: "k",
|
|
338
|
+
cond: {
|
|
339
|
+
$not: [{ $in: [{ $arrayElemAt: [{ $split: ["$$k", ":"] }, 0] }, GENERIC_SUBJECT_TYPES] }]
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
0
|
|
344
|
+
]
|
|
345
|
+
},
|
|
346
|
+
{ $arrayElemAt: ["$$keys", 0] }
|
|
347
|
+
]
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
};
|
|
326
351
|
var typePrefix = (ref) => ({
|
|
327
352
|
$let: {
|
|
328
353
|
vars: { ref },
|
|
@@ -350,7 +375,7 @@ function dimExpression(dim2) {
|
|
|
350
375
|
}
|
|
351
376
|
return { $ifNull: [`$${path}`, null] };
|
|
352
377
|
}
|
|
353
|
-
if (dim2 === "subjectType") return typePrefix(
|
|
378
|
+
if (dim2 === "subjectType") return typePrefix(mostSpecificSubject);
|
|
354
379
|
if (dim2 === "actorType") return typePrefix("$actor");
|
|
355
380
|
throw badRequest(
|
|
356
381
|
`"${dim2}" is not a dimension. Use "attr:<key>", "field:<path>", "subjectType" or "actorType".`
|