@mastra/mongodb 1.7.2-alpha.0 → 1.7.2
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/CHANGELOG.md +20 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +39 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +39 -1
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/observability/index.d.ts +2 -1
- package/dist/storage/domains/observability/index.d.ts.map +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { saveScorePayloadSchema } from '@mastra/core/evals';
|
|
|
12
12
|
|
|
13
13
|
// package.json
|
|
14
14
|
var package_default = {
|
|
15
|
-
version: "1.7.2
|
|
15
|
+
version: "1.7.2"};
|
|
16
16
|
var MongoDBFilterTranslator = class extends BaseFilterTranslator {
|
|
17
17
|
getSupportedOperators() {
|
|
18
18
|
return {
|
|
@@ -6648,6 +6648,44 @@ Note: This migration may take some time for large collections.
|
|
|
6648
6648
|
);
|
|
6649
6649
|
}
|
|
6650
6650
|
}
|
|
6651
|
+
async getTraceLight(args) {
|
|
6652
|
+
const { traceId } = args;
|
|
6653
|
+
try {
|
|
6654
|
+
const collection = await this.getCollection(TABLE_SPANS);
|
|
6655
|
+
const spans = await collection.find(
|
|
6656
|
+
{ traceId },
|
|
6657
|
+
{
|
|
6658
|
+
projection: {
|
|
6659
|
+
input: 0,
|
|
6660
|
+
output: 0,
|
|
6661
|
+
attributes: 0,
|
|
6662
|
+
metadata: 0,
|
|
6663
|
+
tags: 0,
|
|
6664
|
+
links: 0
|
|
6665
|
+
}
|
|
6666
|
+
}
|
|
6667
|
+
).sort({ startedAt: 1 }).toArray();
|
|
6668
|
+
if (!spans || spans.length === 0) {
|
|
6669
|
+
return null;
|
|
6670
|
+
}
|
|
6671
|
+
return {
|
|
6672
|
+
traceId,
|
|
6673
|
+
spans: spans.map((span) => this.transformSpanFromMongo(span))
|
|
6674
|
+
};
|
|
6675
|
+
} catch (error) {
|
|
6676
|
+
throw new MastraError(
|
|
6677
|
+
{
|
|
6678
|
+
id: createStorageErrorId("MONGODB", "GET_TRACE_LIGHT", "FAILED"),
|
|
6679
|
+
domain: ErrorDomain.STORAGE,
|
|
6680
|
+
category: ErrorCategory.USER,
|
|
6681
|
+
details: {
|
|
6682
|
+
traceId
|
|
6683
|
+
}
|
|
6684
|
+
},
|
|
6685
|
+
error
|
|
6686
|
+
);
|
|
6687
|
+
}
|
|
6688
|
+
}
|
|
6651
6689
|
async updateSpan(args) {
|
|
6652
6690
|
const { traceId, spanId, updates } = args;
|
|
6653
6691
|
try {
|