@mastra/mssql 1.2.1-alpha.0 → 1.2.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/CHANGELOG.md +20 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +45 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +45 -0
- 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 +10 -10
package/dist/index.js
CHANGED
|
@@ -2936,6 +2936,51 @@ var ObservabilityMSSQL = class _ObservabilityMSSQL extends ObservabilityStorage
|
|
|
2936
2936
|
);
|
|
2937
2937
|
}
|
|
2938
2938
|
}
|
|
2939
|
+
async getTraceLight(args) {
|
|
2940
|
+
const { traceId } = args;
|
|
2941
|
+
try {
|
|
2942
|
+
const tableName = getTableName2({
|
|
2943
|
+
indexName: TABLE_SPANS,
|
|
2944
|
+
schemaName: getSchemaName2(this.schema)
|
|
2945
|
+
});
|
|
2946
|
+
const request = this.pool.request();
|
|
2947
|
+
request.input("traceId", traceId);
|
|
2948
|
+
const result = await request.query(
|
|
2949
|
+
`SELECT
|
|
2950
|
+
[traceId], [spanId], [parentSpanId], [name],
|
|
2951
|
+
[entityType], [entityId], [entityName],
|
|
2952
|
+
[spanType], [error], [isEvent],
|
|
2953
|
+
[startedAt], [endedAt], [createdAt], [updatedAt]
|
|
2954
|
+
FROM ${tableName}
|
|
2955
|
+
WHERE [traceId] = @traceId
|
|
2956
|
+
ORDER BY [startedAt] ASC`
|
|
2957
|
+
);
|
|
2958
|
+
if (!result.recordset || result.recordset.length === 0) {
|
|
2959
|
+
return null;
|
|
2960
|
+
}
|
|
2961
|
+
return {
|
|
2962
|
+
traceId,
|
|
2963
|
+
spans: result.recordset.map(
|
|
2964
|
+
(span) => transformFromSqlRow({
|
|
2965
|
+
tableName: TABLE_SPANS,
|
|
2966
|
+
sqlRow: span
|
|
2967
|
+
})
|
|
2968
|
+
)
|
|
2969
|
+
};
|
|
2970
|
+
} catch (error) {
|
|
2971
|
+
throw new MastraError(
|
|
2972
|
+
{
|
|
2973
|
+
id: createStorageErrorId("MSSQL", "GET_TRACE_LIGHT", "FAILED"),
|
|
2974
|
+
domain: ErrorDomain.STORAGE,
|
|
2975
|
+
category: ErrorCategory.USER,
|
|
2976
|
+
details: {
|
|
2977
|
+
traceId
|
|
2978
|
+
}
|
|
2979
|
+
},
|
|
2980
|
+
error
|
|
2981
|
+
);
|
|
2982
|
+
}
|
|
2983
|
+
}
|
|
2939
2984
|
async getSpan(args) {
|
|
2940
2985
|
const { traceId, spanId } = args;
|
|
2941
2986
|
try {
|