@mastra/mssql 0.0.0-main-test-20251105183450 → 0.0.0-main-test-05-11-2025-2-20251105223343
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 +6 -4
- package/README.md +9 -9
- package/dist/index.cjs +30 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +31 -31
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/observability/index.d.ts +4 -4
- package/dist/storage/domains/observability/index.d.ts.map +1 -1
- package/dist/storage/index.d.ts +4 -4
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @mastra/mssql
|
|
2
2
|
|
|
3
|
-
## 0.0.0-main-test-
|
|
3
|
+
## 0.0.0-main-test-05-11-2025-2-20251105223343
|
|
4
4
|
|
|
5
5
|
### Major Changes
|
|
6
6
|
|
|
@@ -123,6 +123,8 @@
|
|
|
123
123
|
|
|
124
124
|
- Remove `getMessagesById` method from storage interfaces in favor of `listMessagesById`. The new method only returns V2-format messages and removes the format parameter, simplifying the API surface. Users should migrate from `getMessagesById({ messageIds, format })` to `listMessagesById({ messageIds })`. ([#9534](https://github.com/mastra-ai/mastra/pull/9534))
|
|
125
125
|
|
|
126
|
+
- Renamed a bunch of observability/tracing-related things to drop the AI prefix. ([#9744](https://github.com/mastra-ai/mastra/pull/9744))
|
|
127
|
+
|
|
126
128
|
- **BREAKING CHANGE**: Pagination APIs now use `page`/`perPage` instead of `offset`/`limit` ([#9592](https://github.com/mastra-ai/mastra/pull/9592))
|
|
127
129
|
|
|
128
130
|
All storage and memory pagination APIs have been updated to use `page` (0-indexed) and `perPage` instead of `offset` and `limit`, aligning with standard REST API patterns.
|
|
@@ -228,7 +230,7 @@
|
|
|
228
230
|
|
|
229
231
|
- Update peer dependencies to match core package version bump (1.0.0) ([#9237](https://github.com/mastra-ai/mastra/pull/9237))
|
|
230
232
|
|
|
231
|
-
- Implemented
|
|
233
|
+
- Implemented tracing and observability features ([#9280](https://github.com/mastra-ai/mastra/pull/9280))
|
|
232
234
|
- Added createAISpan, updateAISpan, getAITrace, getAITracesPaginated
|
|
233
235
|
- Added batchCreateAISpans, batchUpdateAISpans, batchDeleteAITraces
|
|
234
236
|
- Automatic performance indexes for AI spans
|
|
@@ -251,8 +253,8 @@
|
|
|
251
253
|
|
|
252
254
|
### Patch Changes
|
|
253
255
|
|
|
254
|
-
- Updated dependencies [[`f743dbb`](https://github.com/mastra-ai/mastra/commit/f743dbb8b40d1627b5c10c0e6fc154f4ebb6e394), [`fec5129`](https://github.com/mastra-ai/mastra/commit/fec5129de7fc64423ea03661a56cef31dc747a0d), [`0491e7c`](https://github.com/mastra-ai/mastra/commit/0491e7c9b714cb0ba22187ee062147ec2dd7c712), [`0e8ed46`](https://github.com/mastra-ai/mastra/commit/0e8ed467c54d6901a6a365f270ec15d6faadb36c), [`6c049d9`](https://github.com/mastra-ai/mastra/commit/6c049d94063fdcbd5b81c4912a2bf82a92c9cc0b), [`3443770`](https://github.com/mastra-ai/mastra/commit/3443770662df8eb24c9df3589b2792d78cfcb811), [`f0a07e0`](https://github.com/mastra-ai/mastra/commit/f0a07e0111b3307c5fabfa4094c5c2cfb734fbe6), [`aaa40e7`](https://github.com/mastra-ai/mastra/commit/aaa40e788628b319baa8e889407d11ad626547fa), [`1521d71`](https://github.com/mastra-ai/mastra/commit/1521d716e5daedc74690c983fbd961123c56756b), [`9e1911d`](https://github.com/mastra-ai/mastra/commit/9e1911db2b4db85e0e768c3f15e0d61e319869f6), [`ebac155`](https://github.com/mastra-ai/mastra/commit/ebac15564a590117db7078233f927a7e28a85106), [`dd1c38d`](https://github.com/mastra-ai/mastra/commit/dd1c38d1b75f1b695c27b40d8d9d6ed00d5e0f6f), [`5948e6a`](https://github.com/mastra-ai/mastra/commit/5948e6a5146c83666ba3f294b2be576c82a513fb), [`8940859`](https://github.com/mastra-ai/mastra/commit/89408593658199b4ad67f7b65e888f344e64a442), [`e629310`](https://github.com/mastra-ai/mastra/commit/e629310f1a73fa236d49ec7a1d1cceb6229dc7cc), [`4c6b492`](https://github.com/mastra-ai/mastra/commit/4c6b492c4dd591c6a592520c1f6855d6e936d71f), [`dff01d8`](https://github.com/mastra-ai/mastra/commit/dff01d81ce1f4e4087cfac20fa868e6db138dd14), [`9d819d5`](https://github.com/mastra-ai/mastra/commit/9d819d54b61481639f4008e4694791bddf187edd), [`71c8d6c`](https://github.com/mastra-ai/mastra/commit/71c8d6c161253207b2b9588bdadb7eed604f7253), [`6179a9b`](https://github.com/mastra-ai/mastra/commit/6179a9ba36ffac326de3cc3c43cdc8028d37c251), [`00f4921`](https://github.com/mastra-ai/mastra/commit/00f4921dd2c91a1e5446799599ef7116a8214a1a), [`ca8041c`](https://github.com/mastra-ai/mastra/commit/ca8041cce0379fda22ed293a565bcb5b6ddca68a), [`7051bf3`](https://github.com/mastra-ai/mastra/commit/7051bf38b3b122a069008f861f7bfc004a6d9f6e), [`a8f1494`](https://github.com/mastra-ai/mastra/commit/a8f1494f4bbdc2770bcf327d4c7d869e332183f1), [`0793497`](https://github.com/mastra-ai/mastra/commit/079349753620c40246ffd673e3f9d7d9820beff3), [`5df9cce`](https://github.com/mastra-ai/mastra/commit/5df9cce1a753438413f64c11eeef8f845745c2a8), [`a854ede`](https://github.com/mastra-ai/mastra/commit/a854ede62bf5ac0945a624ac48913dd69c73aabf), [`c576fc0`](https://github.com/mastra-ai/mastra/commit/c576fc0b100b2085afded91a37c97a0ea0ec09c7), [`3defc80`](https://github.com/mastra-ai/mastra/commit/3defc80cf2b88a1b7fc1cc4ddcb91e982a614609), [`16153fe`](https://github.com/mastra-ai/mastra/commit/16153fe7eb13c99401f48e6ca32707c965ee28b9), [`9f4a683`](https://github.com/mastra-ai/mastra/commit/9f4a6833e88b52574665c028fd5508ad5c2f6004), [`bc94344`](https://github.com/mastra-ai/mastra/commit/bc943444a1342d8a662151b7bce1df7dae32f59c), [`57d157f`](https://github.com/mastra-ai/mastra/commit/57d157f0b163a95c3e6c9eae31bdb11d1bfc64f9), [`2a90c55`](https://github.com/mastra-ai/mastra/commit/2a90c55a86a9210697d5adaab5ee94584b079adc), [`96d35f6`](https://github.com/mastra-ai/mastra/commit/96d35f61376bc2b1bf148648a2c1985bd51bef55), [`5cbe88a`](https://github.com/mastra-ai/mastra/commit/5cbe88aefbd9f933bca669fd371ea36bf939ac6d), [`a1bd7b8`](https://github.com/mastra-ai/mastra/commit/a1bd7b8571db16b94eb01588f451a74758c96d65), [`d78b38d`](https://github.com/mastra-ai/mastra/commit/d78b38d898fce285260d3bbb4befade54331617f), [`0633100`](https://github.com/mastra-ai/mastra/commit/0633100a911ad22f5256471bdf753da21c104742), [`c710c16`](https://github.com/mastra-ai/mastra/commit/c710c1652dccfdc4111c8412bca7a6bb1d48b441), [`354ad0b`](https://github.com/mastra-ai/mastra/commit/354ad0b7b1b8183ac567f236a884fc7ede6d7138), [`cfae733`](https://github.com/mastra-ai/mastra/commit/cfae73394f4920635e6c919c8e95ff9a0788e2e5), [`e3dfda7`](https://github.com/mastra-ai/mastra/commit/e3dfda7b11bf3b8c4bb55637028befb5f387fc74), [`844ea5d`](https://github.com/mastra-ai/mastra/commit/844ea5dc0c248961e7bf73629ae7dcff503e853c), [`f0f8f12`](https://github.com/mastra-ai/mastra/commit/f0f8f125c308f2d0fd36942ef652fd852df7522f), [`0d7618b`](https://github.com/mastra-ai/mastra/commit/0d7618bc650bf2800934b243eca5648f4aeed9c2), [`7b763e5`](https://github.com/mastra-ai/mastra/commit/7b763e52fc3eaf699c2a99f2adf418dd46e4e9a5), [`d36cfbb`](https://github.com/mastra-ai/mastra/commit/d36cfbbb6565ba5f827883cc9bb648eb14befdc1), [`3697853`](https://github.com/mastra-ai/mastra/commit/3697853deeb72017d90e0f38a93c1e29221aeca0), [`a534e95`](https://github.com/mastra-ai/mastra/commit/a534e9591f83b3cc1ebff99c67edf4cda7bf81d3), [`9d0e7fe`](https://github.com/mastra-ai/mastra/commit/9d0e7feca8ed98de959f53476ee1456073673348), [`53d927c`](https://github.com/mastra-ai/mastra/commit/53d927cc6f03bff33655b7e2b788da445a08731d), [`22f64bc`](https://github.com/mastra-ai/mastra/commit/22f64bc1d37149480b58bf2fefe35b79a1e3e7d5), [`83d5942`](https://github.com/mastra-ai/mastra/commit/83d5942669ce7bba4a6ca4fd4da697a10eb5ebdc), [`bda6370`](https://github.com/mastra-ai/mastra/commit/bda637009360649aaf579919e7873e33553c273e), [`d7acd8e`](https://github.com/mastra-ai/mastra/commit/d7acd8e987b5d7eff4fd98b0906c17c06a2e83d5), [`c7f1f7d`](https://github.com/mastra-ai/mastra/commit/c7f1f7d24f61f247f018cc2d1f33bf63212959a7), [`0bddc6d`](https://github.com/mastra-ai/mastra/commit/0bddc6d8dbd6f6008c0cba2e4960a2da75a55af1), [`735d8c1`](https://github.com/mastra-ai/mastra/commit/735d8c1c0d19fbc09e6f8b66cf41bc7655993838), [`acf322e`](https://github.com/mastra-ai/mastra/commit/acf322e0f1fd0189684cf529d91c694bea918a45), [`c942802`](https://github.com/mastra-ai/mastra/commit/c942802a477a925b01859a7b8688d4355715caaa), [`a0c8c1b`](https://github.com/mastra-ai/mastra/commit/a0c8c1b87d4fee252aebda73e8637fbe01d761c9), [`cc34739`](https://github.com/mastra-ai/mastra/commit/cc34739c34b6266a91bea561119240a7acf47887), [`c218bd3`](https://github.com/mastra-ai/mastra/commit/c218bd3759e32423735b04843a09404572631014), [`2c4438b`](https://github.com/mastra-ai/mastra/commit/2c4438b87817ab7eed818c7990fef010475af1a3), [`2b8893c`](https://github.com/mastra-ai/mastra/commit/2b8893cb108ef9acb72ee7835cd625610d2c1a4a), [`8e5c75b`](https://github.com/mastra-ai/mastra/commit/8e5c75bdb1d08a42d45309a4c72def4b6890230f), [`fa8409b`](https://github.com/mastra-ai/mastra/commit/fa8409bc39cfd8ba6643b9db5269b90b22e2a2f7), [`173c535`](https://github.com/mastra-ai/mastra/commit/173c535c0645b0da404fe09f003778f0b0d4e019)]:
|
|
255
|
-
- @mastra/core@0.0.0-main-test-
|
|
256
|
+
- Updated dependencies [[`f743dbb`](https://github.com/mastra-ai/mastra/commit/f743dbb8b40d1627b5c10c0e6fc154f4ebb6e394), [`fec5129`](https://github.com/mastra-ai/mastra/commit/fec5129de7fc64423ea03661a56cef31dc747a0d), [`0491e7c`](https://github.com/mastra-ai/mastra/commit/0491e7c9b714cb0ba22187ee062147ec2dd7c712), [`0e8ed46`](https://github.com/mastra-ai/mastra/commit/0e8ed467c54d6901a6a365f270ec15d6faadb36c), [`6c049d9`](https://github.com/mastra-ai/mastra/commit/6c049d94063fdcbd5b81c4912a2bf82a92c9cc0b), [`3443770`](https://github.com/mastra-ai/mastra/commit/3443770662df8eb24c9df3589b2792d78cfcb811), [`f0a07e0`](https://github.com/mastra-ai/mastra/commit/f0a07e0111b3307c5fabfa4094c5c2cfb734fbe6), [`aaa40e7`](https://github.com/mastra-ai/mastra/commit/aaa40e788628b319baa8e889407d11ad626547fa), [`1521d71`](https://github.com/mastra-ai/mastra/commit/1521d716e5daedc74690c983fbd961123c56756b), [`9e1911d`](https://github.com/mastra-ai/mastra/commit/9e1911db2b4db85e0e768c3f15e0d61e319869f6), [`ebac155`](https://github.com/mastra-ai/mastra/commit/ebac15564a590117db7078233f927a7e28a85106), [`dd1c38d`](https://github.com/mastra-ai/mastra/commit/dd1c38d1b75f1b695c27b40d8d9d6ed00d5e0f6f), [`5948e6a`](https://github.com/mastra-ai/mastra/commit/5948e6a5146c83666ba3f294b2be576c82a513fb), [`8940859`](https://github.com/mastra-ai/mastra/commit/89408593658199b4ad67f7b65e888f344e64a442), [`e629310`](https://github.com/mastra-ai/mastra/commit/e629310f1a73fa236d49ec7a1d1cceb6229dc7cc), [`4c6b492`](https://github.com/mastra-ai/mastra/commit/4c6b492c4dd591c6a592520c1f6855d6e936d71f), [`dff01d8`](https://github.com/mastra-ai/mastra/commit/dff01d81ce1f4e4087cfac20fa868e6db138dd14), [`9d819d5`](https://github.com/mastra-ai/mastra/commit/9d819d54b61481639f4008e4694791bddf187edd), [`71c8d6c`](https://github.com/mastra-ai/mastra/commit/71c8d6c161253207b2b9588bdadb7eed604f7253), [`6179a9b`](https://github.com/mastra-ai/mastra/commit/6179a9ba36ffac326de3cc3c43cdc8028d37c251), [`00f4921`](https://github.com/mastra-ai/mastra/commit/00f4921dd2c91a1e5446799599ef7116a8214a1a), [`ca8041c`](https://github.com/mastra-ai/mastra/commit/ca8041cce0379fda22ed293a565bcb5b6ddca68a), [`7051bf3`](https://github.com/mastra-ai/mastra/commit/7051bf38b3b122a069008f861f7bfc004a6d9f6e), [`a8f1494`](https://github.com/mastra-ai/mastra/commit/a8f1494f4bbdc2770bcf327d4c7d869e332183f1), [`0793497`](https://github.com/mastra-ai/mastra/commit/079349753620c40246ffd673e3f9d7d9820beff3), [`5df9cce`](https://github.com/mastra-ai/mastra/commit/5df9cce1a753438413f64c11eeef8f845745c2a8), [`a854ede`](https://github.com/mastra-ai/mastra/commit/a854ede62bf5ac0945a624ac48913dd69c73aabf), [`c576fc0`](https://github.com/mastra-ai/mastra/commit/c576fc0b100b2085afded91a37c97a0ea0ec09c7), [`3defc80`](https://github.com/mastra-ai/mastra/commit/3defc80cf2b88a1b7fc1cc4ddcb91e982a614609), [`16153fe`](https://github.com/mastra-ai/mastra/commit/16153fe7eb13c99401f48e6ca32707c965ee28b9), [`9f4a683`](https://github.com/mastra-ai/mastra/commit/9f4a6833e88b52574665c028fd5508ad5c2f6004), [`bc94344`](https://github.com/mastra-ai/mastra/commit/bc943444a1342d8a662151b7bce1df7dae32f59c), [`57d157f`](https://github.com/mastra-ai/mastra/commit/57d157f0b163a95c3e6c9eae31bdb11d1bfc64f9), [`2a90c55`](https://github.com/mastra-ai/mastra/commit/2a90c55a86a9210697d5adaab5ee94584b079adc), [`eb09742`](https://github.com/mastra-ai/mastra/commit/eb09742197f66c4c38154c3beec78313e69760b2), [`96d35f6`](https://github.com/mastra-ai/mastra/commit/96d35f61376bc2b1bf148648a2c1985bd51bef55), [`5cbe88a`](https://github.com/mastra-ai/mastra/commit/5cbe88aefbd9f933bca669fd371ea36bf939ac6d), [`a1bd7b8`](https://github.com/mastra-ai/mastra/commit/a1bd7b8571db16b94eb01588f451a74758c96d65), [`d78b38d`](https://github.com/mastra-ai/mastra/commit/d78b38d898fce285260d3bbb4befade54331617f), [`0633100`](https://github.com/mastra-ai/mastra/commit/0633100a911ad22f5256471bdf753da21c104742), [`c710c16`](https://github.com/mastra-ai/mastra/commit/c710c1652dccfdc4111c8412bca7a6bb1d48b441), [`354ad0b`](https://github.com/mastra-ai/mastra/commit/354ad0b7b1b8183ac567f236a884fc7ede6d7138), [`cfae733`](https://github.com/mastra-ai/mastra/commit/cfae73394f4920635e6c919c8e95ff9a0788e2e5), [`e3dfda7`](https://github.com/mastra-ai/mastra/commit/e3dfda7b11bf3b8c4bb55637028befb5f387fc74), [`844ea5d`](https://github.com/mastra-ai/mastra/commit/844ea5dc0c248961e7bf73629ae7dcff503e853c), [`f0f8f12`](https://github.com/mastra-ai/mastra/commit/f0f8f125c308f2d0fd36942ef652fd852df7522f), [`0d7618b`](https://github.com/mastra-ai/mastra/commit/0d7618bc650bf2800934b243eca5648f4aeed9c2), [`7b763e5`](https://github.com/mastra-ai/mastra/commit/7b763e52fc3eaf699c2a99f2adf418dd46e4e9a5), [`d36cfbb`](https://github.com/mastra-ai/mastra/commit/d36cfbbb6565ba5f827883cc9bb648eb14befdc1), [`3697853`](https://github.com/mastra-ai/mastra/commit/3697853deeb72017d90e0f38a93c1e29221aeca0), [`a534e95`](https://github.com/mastra-ai/mastra/commit/a534e9591f83b3cc1ebff99c67edf4cda7bf81d3), [`9d0e7fe`](https://github.com/mastra-ai/mastra/commit/9d0e7feca8ed98de959f53476ee1456073673348), [`53d927c`](https://github.com/mastra-ai/mastra/commit/53d927cc6f03bff33655b7e2b788da445a08731d), [`22f64bc`](https://github.com/mastra-ai/mastra/commit/22f64bc1d37149480b58bf2fefe35b79a1e3e7d5), [`83d5942`](https://github.com/mastra-ai/mastra/commit/83d5942669ce7bba4a6ca4fd4da697a10eb5ebdc), [`b7959e6`](https://github.com/mastra-ai/mastra/commit/b7959e6e25a46b480f9ea2217c4c6c588c423791), [`bda6370`](https://github.com/mastra-ai/mastra/commit/bda637009360649aaf579919e7873e33553c273e), [`d7acd8e`](https://github.com/mastra-ai/mastra/commit/d7acd8e987b5d7eff4fd98b0906c17c06a2e83d5), [`c7f1f7d`](https://github.com/mastra-ai/mastra/commit/c7f1f7d24f61f247f018cc2d1f33bf63212959a7), [`0bddc6d`](https://github.com/mastra-ai/mastra/commit/0bddc6d8dbd6f6008c0cba2e4960a2da75a55af1), [`735d8c1`](https://github.com/mastra-ai/mastra/commit/735d8c1c0d19fbc09e6f8b66cf41bc7655993838), [`acf322e`](https://github.com/mastra-ai/mastra/commit/acf322e0f1fd0189684cf529d91c694bea918a45), [`c942802`](https://github.com/mastra-ai/mastra/commit/c942802a477a925b01859a7b8688d4355715caaa), [`a0c8c1b`](https://github.com/mastra-ai/mastra/commit/a0c8c1b87d4fee252aebda73e8637fbe01d761c9), [`cc34739`](https://github.com/mastra-ai/mastra/commit/cc34739c34b6266a91bea561119240a7acf47887), [`c218bd3`](https://github.com/mastra-ai/mastra/commit/c218bd3759e32423735b04843a09404572631014), [`2c4438b`](https://github.com/mastra-ai/mastra/commit/2c4438b87817ab7eed818c7990fef010475af1a3), [`2b8893c`](https://github.com/mastra-ai/mastra/commit/2b8893cb108ef9acb72ee7835cd625610d2c1a4a), [`8e5c75b`](https://github.com/mastra-ai/mastra/commit/8e5c75bdb1d08a42d45309a4c72def4b6890230f), [`e59e0d3`](https://github.com/mastra-ai/mastra/commit/e59e0d32afb5fcf2c9f3c00c8f81f6c21d3a63fa), [`fa8409b`](https://github.com/mastra-ai/mastra/commit/fa8409bc39cfd8ba6643b9db5269b90b22e2a2f7), [`173c535`](https://github.com/mastra-ai/mastra/commit/173c535c0645b0da404fe09f003778f0b0d4e019)]:
|
|
257
|
+
- @mastra/core@0.0.0-main-test-05-11-2025-2-20251105223343
|
|
256
258
|
|
|
257
259
|
## 0.4.6
|
|
258
260
|
|
package/README.md
CHANGED
|
@@ -161,7 +161,7 @@ MSSQLStore supports multiple connection methods:
|
|
|
161
161
|
- Rich metadata support
|
|
162
162
|
- Update working memory and metadata independently
|
|
163
163
|
|
|
164
|
-
- **
|
|
164
|
+
- **Tracing & Observability**
|
|
165
165
|
- Trace AI agent execution with spans
|
|
166
166
|
- Query traces with pagination and filtering
|
|
167
167
|
- Batch operations for high-volume tracing
|
|
@@ -225,15 +225,15 @@ MSSQLStore supports multiple connection methods:
|
|
|
225
225
|
- `getResourceById({ resourceId })`: Get a resource by ID
|
|
226
226
|
- `updateResource({ resourceId, workingMemory?, metadata? })`: Update resource working memory and metadata
|
|
227
227
|
|
|
228
|
-
###
|
|
228
|
+
### Tracing & Observability
|
|
229
229
|
|
|
230
|
-
- `
|
|
231
|
-
- `
|
|
232
|
-
- `
|
|
233
|
-
- `
|
|
234
|
-
- `
|
|
235
|
-
- `
|
|
236
|
-
- `
|
|
230
|
+
- `createSpan(span)`: Create a trace span
|
|
231
|
+
- `updateSpan({ spanId, traceId, updates })`: Update an existing span
|
|
232
|
+
- `getTrace(traceId)`: Get complete trace with all spans
|
|
233
|
+
- `getTracesPaginated({ filters?, pagination? })`: Query traces with pagination and filters
|
|
234
|
+
- `batchCreateSpans({ records })`: Batch create multiple spans
|
|
235
|
+
- `batchUpdateSpans({ records })`: Batch update multiple spans
|
|
236
|
+
- `batchDeleteTraces({ traceIds })`: Batch delete traces
|
|
237
237
|
|
|
238
238
|
### Index Management
|
|
239
239
|
|
package/dist/index.cjs
CHANGED
|
@@ -988,11 +988,11 @@ var ObservabilityMSSQL = class extends storage.ObservabilityStorage {
|
|
|
988
988
|
endedAt
|
|
989
989
|
// Note: createdAt/updatedAt will be set by default values
|
|
990
990
|
};
|
|
991
|
-
return this.operations.insert({ tableName: storage.
|
|
991
|
+
return this.operations.insert({ tableName: storage.TABLE_SPANS, record });
|
|
992
992
|
} catch (error$1) {
|
|
993
993
|
throw new error.MastraError(
|
|
994
994
|
{
|
|
995
|
-
id: "
|
|
995
|
+
id: "MSSQL_STORE_CREATE_SPAN_FAILED",
|
|
996
996
|
domain: error.ErrorDomain.STORAGE,
|
|
997
997
|
category: error.ErrorCategory.USER,
|
|
998
998
|
details: {
|
|
@@ -1006,10 +1006,10 @@ var ObservabilityMSSQL = class extends storage.ObservabilityStorage {
|
|
|
1006
1006
|
);
|
|
1007
1007
|
}
|
|
1008
1008
|
}
|
|
1009
|
-
async
|
|
1009
|
+
async getTrace(traceId) {
|
|
1010
1010
|
try {
|
|
1011
1011
|
const tableName = getTableName({
|
|
1012
|
-
indexName: storage.
|
|
1012
|
+
indexName: storage.TABLE_SPANS,
|
|
1013
1013
|
schemaName: getSchemaName(this.schema)
|
|
1014
1014
|
});
|
|
1015
1015
|
const request = this.pool.request();
|
|
@@ -1030,7 +1030,7 @@ var ObservabilityMSSQL = class extends storage.ObservabilityStorage {
|
|
|
1030
1030
|
traceId,
|
|
1031
1031
|
spans: result.recordset.map(
|
|
1032
1032
|
(span) => transformFromSqlRow({
|
|
1033
|
-
tableName: storage.
|
|
1033
|
+
tableName: storage.TABLE_SPANS,
|
|
1034
1034
|
sqlRow: span
|
|
1035
1035
|
})
|
|
1036
1036
|
)
|
|
@@ -1038,7 +1038,7 @@ var ObservabilityMSSQL = class extends storage.ObservabilityStorage {
|
|
|
1038
1038
|
} catch (error$1) {
|
|
1039
1039
|
throw new error.MastraError(
|
|
1040
1040
|
{
|
|
1041
|
-
id: "
|
|
1041
|
+
id: "MSSQL_STORE_GET_TRACE_FAILED",
|
|
1042
1042
|
domain: error.ErrorDomain.STORAGE,
|
|
1043
1043
|
category: error.ErrorCategory.USER,
|
|
1044
1044
|
details: {
|
|
@@ -1063,14 +1063,14 @@ var ObservabilityMSSQL = class extends storage.ObservabilityStorage {
|
|
|
1063
1063
|
data.startedAt = data.startedAt.toISOString();
|
|
1064
1064
|
}
|
|
1065
1065
|
await this.operations.update({
|
|
1066
|
-
tableName: storage.
|
|
1066
|
+
tableName: storage.TABLE_SPANS,
|
|
1067
1067
|
keys: { spanId, traceId },
|
|
1068
1068
|
data
|
|
1069
1069
|
});
|
|
1070
1070
|
} catch (error$1) {
|
|
1071
1071
|
throw new error.MastraError(
|
|
1072
1072
|
{
|
|
1073
|
-
id: "
|
|
1073
|
+
id: "MSSQL_STORE_UPDATE_SPAN_FAILED",
|
|
1074
1074
|
domain: error.ErrorDomain.STORAGE,
|
|
1075
1075
|
category: error.ErrorCategory.USER,
|
|
1076
1076
|
details: {
|
|
@@ -1082,7 +1082,7 @@ var ObservabilityMSSQL = class extends storage.ObservabilityStorage {
|
|
|
1082
1082
|
);
|
|
1083
1083
|
}
|
|
1084
1084
|
}
|
|
1085
|
-
async
|
|
1085
|
+
async getTracesPaginated({
|
|
1086
1086
|
filters,
|
|
1087
1087
|
pagination
|
|
1088
1088
|
}) {
|
|
@@ -1107,7 +1107,7 @@ var ObservabilityMSSQL = class extends storage.ObservabilityStorage {
|
|
|
1107
1107
|
name = `agent run: '${entityId}'`;
|
|
1108
1108
|
} else {
|
|
1109
1109
|
const error$1 = new error.MastraError({
|
|
1110
|
-
id: "
|
|
1110
|
+
id: "MSSQL_STORE_GET_TRACES_PAGINATED_FAILED",
|
|
1111
1111
|
domain: error.ErrorDomain.STORAGE,
|
|
1112
1112
|
category: error.ErrorCategory.USER,
|
|
1113
1113
|
details: {
|
|
@@ -1126,7 +1126,7 @@ var ObservabilityMSSQL = class extends storage.ObservabilityStorage {
|
|
|
1126
1126
|
params[entityParam] = name;
|
|
1127
1127
|
}
|
|
1128
1128
|
const tableName = getTableName({
|
|
1129
|
-
indexName: storage.
|
|
1129
|
+
indexName: storage.TABLE_SPANS,
|
|
1130
1130
|
schemaName: getSchemaName(this.schema)
|
|
1131
1131
|
});
|
|
1132
1132
|
try {
|
|
@@ -1160,7 +1160,7 @@ var ObservabilityMSSQL = class extends storage.ObservabilityStorage {
|
|
|
1160
1160
|
);
|
|
1161
1161
|
const spans = dataResult.recordset.map(
|
|
1162
1162
|
(row) => transformFromSqlRow({
|
|
1163
|
-
tableName: storage.
|
|
1163
|
+
tableName: storage.TABLE_SPANS,
|
|
1164
1164
|
sqlRow: row
|
|
1165
1165
|
})
|
|
1166
1166
|
);
|
|
@@ -1176,7 +1176,7 @@ var ObservabilityMSSQL = class extends storage.ObservabilityStorage {
|
|
|
1176
1176
|
} catch (error$1) {
|
|
1177
1177
|
throw new error.MastraError(
|
|
1178
1178
|
{
|
|
1179
|
-
id: "
|
|
1179
|
+
id: "MSSQL_STORE_GET_TRACES_PAGINATED_FAILED",
|
|
1180
1180
|
domain: error.ErrorDomain.STORAGE,
|
|
1181
1181
|
category: error.ErrorCategory.USER
|
|
1182
1182
|
},
|
|
@@ -1190,7 +1190,7 @@ var ObservabilityMSSQL = class extends storage.ObservabilityStorage {
|
|
|
1190
1190
|
}
|
|
1191
1191
|
try {
|
|
1192
1192
|
await this.operations.batchInsert({
|
|
1193
|
-
tableName: storage.
|
|
1193
|
+
tableName: storage.TABLE_SPANS,
|
|
1194
1194
|
records: args.records.map((span) => ({
|
|
1195
1195
|
...span,
|
|
1196
1196
|
startedAt: span.startedAt instanceof Date ? span.startedAt.toISOString() : span.startedAt,
|
|
@@ -1200,7 +1200,7 @@ var ObservabilityMSSQL = class extends storage.ObservabilityStorage {
|
|
|
1200
1200
|
} catch (error$1) {
|
|
1201
1201
|
throw new error.MastraError(
|
|
1202
1202
|
{
|
|
1203
|
-
id: "
|
|
1203
|
+
id: "MSSQL_STORE_BATCH_CREATE_SPANS_FAILED",
|
|
1204
1204
|
domain: error.ErrorDomain.STORAGE,
|
|
1205
1205
|
category: error.ErrorCategory.USER,
|
|
1206
1206
|
details: {
|
|
@@ -1230,13 +1230,13 @@ var ObservabilityMSSQL = class extends storage.ObservabilityStorage {
|
|
|
1230
1230
|
};
|
|
1231
1231
|
});
|
|
1232
1232
|
await this.operations.batchUpdate({
|
|
1233
|
-
tableName: storage.
|
|
1233
|
+
tableName: storage.TABLE_SPANS,
|
|
1234
1234
|
updates
|
|
1235
1235
|
});
|
|
1236
1236
|
} catch (error$1) {
|
|
1237
1237
|
throw new error.MastraError(
|
|
1238
1238
|
{
|
|
1239
|
-
id: "
|
|
1239
|
+
id: "MSSQL_STORE_BATCH_UPDATE_SPANS_FAILED",
|
|
1240
1240
|
domain: error.ErrorDomain.STORAGE,
|
|
1241
1241
|
category: error.ErrorCategory.USER,
|
|
1242
1242
|
details: {
|
|
@@ -1247,20 +1247,20 @@ var ObservabilityMSSQL = class extends storage.ObservabilityStorage {
|
|
|
1247
1247
|
);
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
|
-
async
|
|
1250
|
+
async batchDeleteTraces(args) {
|
|
1251
1251
|
if (!args.traceIds || args.traceIds.length === 0) {
|
|
1252
1252
|
return;
|
|
1253
1253
|
}
|
|
1254
1254
|
try {
|
|
1255
1255
|
const keys = args.traceIds.map((traceId) => ({ traceId }));
|
|
1256
1256
|
await this.operations.batchDelete({
|
|
1257
|
-
tableName: storage.
|
|
1257
|
+
tableName: storage.TABLE_SPANS,
|
|
1258
1258
|
keys
|
|
1259
1259
|
});
|
|
1260
1260
|
} catch (error$1) {
|
|
1261
1261
|
throw new error.MastraError(
|
|
1262
1262
|
{
|
|
1263
|
-
id: "
|
|
1263
|
+
id: "MSSQL_STORE_BATCH_DELETE_TRACES_FAILED",
|
|
1264
1264
|
domain: error.ErrorDomain.STORAGE,
|
|
1265
1265
|
category: error.ErrorCategory.USER,
|
|
1266
1266
|
details: {
|
|
@@ -2167,22 +2167,22 @@ ${columns}
|
|
|
2167
2167
|
// Spans indexes for optimal trace querying
|
|
2168
2168
|
{
|
|
2169
2169
|
name: `${schemaPrefix}mastra_ai_spans_traceid_startedat_idx`,
|
|
2170
|
-
table: storage.
|
|
2170
|
+
table: storage.TABLE_SPANS,
|
|
2171
2171
|
columns: ["traceId", "startedAt DESC"]
|
|
2172
2172
|
},
|
|
2173
2173
|
{
|
|
2174
2174
|
name: `${schemaPrefix}mastra_ai_spans_parentspanid_startedat_idx`,
|
|
2175
|
-
table: storage.
|
|
2175
|
+
table: storage.TABLE_SPANS,
|
|
2176
2176
|
columns: ["parentSpanId", "startedAt DESC"]
|
|
2177
2177
|
},
|
|
2178
2178
|
{
|
|
2179
2179
|
name: `${schemaPrefix}mastra_ai_spans_name_idx`,
|
|
2180
|
-
table: storage.
|
|
2180
|
+
table: storage.TABLE_SPANS,
|
|
2181
2181
|
columns: ["name"]
|
|
2182
2182
|
},
|
|
2183
2183
|
{
|
|
2184
2184
|
name: `${schemaPrefix}mastra_ai_spans_spantype_startedat_idx`,
|
|
2185
|
-
table: storage.
|
|
2185
|
+
table: storage.TABLE_SPANS,
|
|
2186
2186
|
columns: ["spanType", "startedAt DESC"]
|
|
2187
2187
|
}
|
|
2188
2188
|
];
|
|
@@ -3198,11 +3198,11 @@ var MSSQLStore = class extends storage.MastraStorage {
|
|
|
3198
3198
|
}) {
|
|
3199
3199
|
return this.getObservabilityStore().updateSpan({ spanId, traceId, updates });
|
|
3200
3200
|
}
|
|
3201
|
-
async
|
|
3202
|
-
return this.getObservabilityStore().
|
|
3201
|
+
async getTrace(traceId) {
|
|
3202
|
+
return this.getObservabilityStore().getTrace(traceId);
|
|
3203
3203
|
}
|
|
3204
|
-
async
|
|
3205
|
-
return this.getObservabilityStore().
|
|
3204
|
+
async getTracesPaginated(args) {
|
|
3205
|
+
return this.getObservabilityStore().getTracesPaginated(args);
|
|
3206
3206
|
}
|
|
3207
3207
|
async batchCreateSpans(args) {
|
|
3208
3208
|
return this.getObservabilityStore().batchCreateSpans(args);
|
|
@@ -3210,8 +3210,8 @@ var MSSQLStore = class extends storage.MastraStorage {
|
|
|
3210
3210
|
async batchUpdateSpans(args) {
|
|
3211
3211
|
return this.getObservabilityStore().batchUpdateSpans(args);
|
|
3212
3212
|
}
|
|
3213
|
-
async
|
|
3214
|
-
return this.getObservabilityStore().
|
|
3213
|
+
async batchDeleteTraces(args) {
|
|
3214
|
+
return this.getObservabilityStore().batchDeleteTraces(args);
|
|
3215
3215
|
}
|
|
3216
3216
|
/**
|
|
3217
3217
|
* Scorers
|