@mastra/mcp-docs-server 1.0.0-beta.22 → 1.0.0-beta.23
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/.docs/organized/changelogs/%40mastra%2Fclient-js.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fcore.md +46 -46
- package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +9 -9
- package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +9 -9
- package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +10 -10
- package/.docs/organized/changelogs/%40mastra%2Freact.md +8 -8
- package/.docs/organized/changelogs/%40mastra%2Fserver.md +8 -8
- package/.docs/raw/observability/tracing/exporters/arize.mdx +0 -19
- package/.docs/raw/observability/tracing/exporters/braintrust.mdx +0 -19
- package/.docs/raw/observability/tracing/exporters/laminar.mdx +0 -13
- package/.docs/raw/observability/tracing/exporters/langfuse.mdx +2 -19
- package/.docs/raw/observability/tracing/exporters/otel.mdx +0 -19
- package/.docs/raw/observability/tracing/exporters/posthog.mdx +0 -20
- package/.docs/raw/observability/tracing/overview.mdx +159 -8
- package/CHANGELOG.md +7 -0
- package/package.json +3 -3
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @mastra/client-js
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`c8417b4`](https://github.com/mastra-ai/mastra/commit/c8417b41d9f3486854dc7842d977fbe5e2166264), [`dd4f34c`](https://github.com/mastra-ai/mastra/commit/dd4f34c78cbae24063463475b0619575c415f9b8)]:
|
|
8
|
+
- @mastra/core@1.0.0-beta.23
|
|
9
|
+
|
|
3
10
|
## 1.0.0-beta.22
|
|
4
11
|
|
|
5
12
|
### Major Changes
|
|
@@ -491,12 +498,5 @@
|
|
|
491
498
|
const runningRuns = await workflow.runs({ status: 'running' });
|
|
492
499
|
|
|
493
500
|
// Get completed workflows
|
|
494
|
-
const completedRuns = await workflow.runs({ status: 'success' });
|
|
495
|
-
```
|
|
496
|
-
|
|
497
|
-
- Updated dependencies [[`d5ed981`](https://github.com/mastra-ai/mastra/commit/d5ed981c8701c1b8a27a5f35a9a2f7d9244e695f), [`9650cce`](https://github.com/mastra-ai/mastra/commit/9650cce52a1d917ff9114653398e2a0f5c3ba808), [`932d63d`](https://github.com/mastra-ai/mastra/commit/932d63dd51be9c8bf1e00e3671fe65606c6fb9cd), [`b760b73`](https://github.com/mastra-ai/mastra/commit/b760b731aca7c8a3f041f61d57a7f125ae9cb215), [`695a621`](https://github.com/mastra-ai/mastra/commit/695a621528bdabeb87f83c2277cf2bb084c7f2b4), [`2b459f4`](https://github.com/mastra-ai/mastra/commit/2b459f466fd91688eeb2a44801dc23f7f8a887ab), [`486352b`](https://github.com/mastra-ai/mastra/commit/486352b66c746602b68a95839f830de14c7fb8c0), [`09e4bae`](https://github.com/mastra-ai/mastra/commit/09e4bae18dd5357d2ae078a4a95a2af32168ab08), [`24b76d8`](https://github.com/mastra-ai/mastra/commit/24b76d8e17656269c8ed09a0c038adb9cc2ae95a), [`243a823`](https://github.com/mastra-ai/mastra/commit/243a8239c5906f5c94e4f78b54676793f7510ae3), [`486352b`](https://github.com/mastra-ai/mastra/commit/486352b66c746602b68a95839f830de14c7fb8c0), [`c61fac3`](https://github.com/mastra-ai/mastra/commit/c61fac3add96f0dcce0208c07415279e2537eb62), [`6f14f70`](https://github.com/mastra-ai/mastra/commit/6f14f706ccaaf81b69544b6c1b75ab66a41e5317), [`09e4bae`](https://github.com/mastra-ai/mastra/commit/09e4bae18dd5357d2ae078a4a95a2af32168ab08), [`4524734`](https://github.com/mastra-ai/mastra/commit/45247343e384717a7c8404296275c56201d6470f), [`2a53598`](https://github.com/mastra-ai/mastra/commit/2a53598c6d8cfeb904a7fc74e57e526d751c8fa6), [`c7cd3c7`](https://github.com/mastra-ai/mastra/commit/c7cd3c7a187d7aaf79e2ca139de328bf609a14b4), [`847c212`](https://github.com/mastra-ai/mastra/commit/847c212caba7df0d6f2fc756b494ac3c75c3720d), [`6f941c4`](https://github.com/mastra-ai/mastra/commit/6f941c438ca5f578619788acc7608fc2e23bd176)]:
|
|
498
|
-
- @mastra/core@1.0.0-beta.12
|
|
499
|
-
- @mastra/schema-compat@1.0.0-beta.3
|
|
500
|
-
|
|
501
501
|
|
|
502
|
-
...
|
|
502
|
+
... 3798 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# @mastra/core
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Added `customSpanFormatter` option to exporters for per-exporter span transformation. This allows different formatting per exporter and supports both synchronous and asynchronous operations, including async data enrichment. ([#11985](https://github.com/mastra-ai/mastra/pull/11985))
|
|
8
|
+
|
|
9
|
+
**Configuration example:**
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { DefaultExporter } from '@mastra/observability';
|
|
13
|
+
import { SpanType } from '@mastra/core/observability';
|
|
14
|
+
import type { CustomSpanFormatter } from '@mastra/core/observability';
|
|
15
|
+
|
|
16
|
+
// Sync formatter
|
|
17
|
+
const plainTextFormatter: CustomSpanFormatter = span => {
|
|
18
|
+
if (span.type === SpanType.AGENT_RUN && Array.isArray(span.input)) {
|
|
19
|
+
const userMessage = span.input.find(m => m.role === 'user');
|
|
20
|
+
return { ...span, input: userMessage?.content ?? span.input };
|
|
21
|
+
}
|
|
22
|
+
return span;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// Async formatter for data enrichment
|
|
26
|
+
const enrichmentFormatter: CustomSpanFormatter = async span => {
|
|
27
|
+
const userData = await fetchUserData(span.metadata?.userId);
|
|
28
|
+
return { ...span, metadata: { ...span.metadata, userName: userData.name } };
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const exporter = new DefaultExporter({
|
|
32
|
+
customSpanFormatter: plainTextFormatter,
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Also added `chainFormatters` utility to combine multiple formatters (supports mixed sync/async):
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import { chainFormatters } from '@mastra/observability';
|
|
40
|
+
|
|
41
|
+
const exporter = new BraintrustExporter({
|
|
42
|
+
customSpanFormatter: chainFormatters([syncFormatter, asyncFormatter]),
|
|
43
|
+
});
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- Fix type recursion by importing from 'zod' instead of 'zod/v3' ([#12009](https://github.com/mastra-ai/mastra/pull/12009))
|
|
47
|
+
|
|
3
48
|
## 1.0.0-beta.22
|
|
4
49
|
|
|
5
50
|
### Major Changes
|
|
@@ -453,50 +498,5 @@
|
|
|
453
498
|
observability: new Observability({
|
|
454
499
|
default: { enabled: true },
|
|
455
500
|
}),
|
|
456
|
-
});
|
|
457
|
-
```
|
|
458
|
-
|
|
459
|
-
**After (recommended):**
|
|
460
|
-
|
|
461
|
-
```typescript
|
|
462
|
-
import { Observability, DefaultExporter, CloudExporter, SensitiveDataFilter } from '@mastra/observability';
|
|
463
|
-
|
|
464
|
-
const mastra = new Mastra({
|
|
465
|
-
observability: new Observability({
|
|
466
|
-
configs: {
|
|
467
|
-
default: {
|
|
468
|
-
serviceName: 'mastra',
|
|
469
|
-
exporters: [new DefaultExporter(), new CloudExporter()],
|
|
470
|
-
spanOutputProcessors: [new SensitiveDataFilter()],
|
|
471
|
-
},
|
|
472
|
-
},
|
|
473
|
-
}),
|
|
474
|
-
});
|
|
475
|
-
```
|
|
476
|
-
|
|
477
|
-
The explicit configuration makes it clear exactly what exporters and processors are being used, improving code readability and maintainability.
|
|
478
|
-
|
|
479
|
-
A deprecation warning will be logged when using the old configuration pattern.
|
|
480
|
-
|
|
481
|
-
- Fix processor tracing to create individual spans per processor ([#11683](https://github.com/mastra-ai/mastra/pull/11683))
|
|
482
|
-
- Processor spans now correctly show processor IDs (e.g., `input processor: validator`) instead of combined workflow IDs
|
|
483
|
-
- Each processor in a chain gets its own trace span, improving observability into processor execution
|
|
484
|
-
- Spans are only created for phases a processor actually implements, eliminating empty spans
|
|
485
|
-
- Internal agent calls within processors now properly nest under their processor span
|
|
486
|
-
- Added `INPUT_STEP_PROCESSOR` and `OUTPUT_STEP_PROCESSOR` entity types for finer-grained tracing
|
|
487
|
-
- Changed `processorType` span attribute to `processorExecutor` with values `'workflow'` or `'legacy'`
|
|
488
|
-
|
|
489
|
-
- Add completion validation to agent networks using custom scorers ([#11562](https://github.com/mastra-ai/mastra/pull/11562))
|
|
490
|
-
|
|
491
|
-
You can now validate whether an agent network has completed its task by passing MastraScorers to `agent.network()`. When validation fails, the network automatically retries with feedback injected into the conversation.
|
|
492
|
-
|
|
493
|
-
**Example: Creating a scorer to verify test coverage**
|
|
494
|
-
|
|
495
|
-
```ts
|
|
496
|
-
import { createScorer } from '@mastra/core/evals';
|
|
497
|
-
import { z } from 'zod';
|
|
498
|
-
|
|
499
|
-
// Create a scorer that checks if tests were written
|
|
500
|
-
const testsScorer = createScorer({
|
|
501
501
|
|
|
502
|
-
...
|
|
502
|
+
... 7959 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @mastra/deployer-cloud
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`c8417b4`](https://github.com/mastra-ai/mastra/commit/c8417b41d9f3486854dc7842d977fbe5e2166264), [`dd4f34c`](https://github.com/mastra-ai/mastra/commit/dd4f34c78cbae24063463475b0619575c415f9b8)]:
|
|
8
|
+
- @mastra/core@1.0.0-beta.23
|
|
9
|
+
- @mastra/deployer@1.0.0-beta.23
|
|
10
|
+
|
|
3
11
|
## 1.0.0-beta.22
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
|
@@ -491,12 +499,4 @@
|
|
|
491
499
|
|
|
492
500
|
- Mutable shared workflow run state ([#8545](https://github.com/mastra-ai/mastra/pull/8545))
|
|
493
501
|
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
- Updated dependencies [[`c621613`](https://github.com/mastra-ai/mastra/commit/c621613069173c69eb2c3ef19a5308894c6549f0), [`ee17cec`](https://github.com/mastra-ai/mastra/commit/ee17cec065f4454740c9cc8f8a841027a5990f57), [`12b1189`](https://github.com/mastra-ai/mastra/commit/12b118942445e4de0dd916c593e33ec78dc3bc73), [`42ffed3`](https://github.com/mastra-ai/mastra/commit/42ffed311b9d8750652bbc55c773be62c989fcc6), [`4783b30`](https://github.com/mastra-ai/mastra/commit/4783b3063efea887825514b783ba27f67912c26d), [`076b092`](https://github.com/mastra-ai/mastra/commit/076b0924902ff0f49d5712d2df24c4cca683713f), [`2aee9e7`](https://github.com/mastra-ai/mastra/commit/2aee9e7d188b8b256a4ddc203ccefb366b4867fa), [`c582906`](https://github.com/mastra-ai/mastra/commit/c5829065a346260f96c4beb8af131b94804ae3ad), [`fa2eb96`](https://github.com/mastra-ai/mastra/commit/fa2eb96af16c7d433891a73932764960d3235c1d), [`ee9108f`](https://github.com/mastra-ai/mastra/commit/ee9108fa29bb8368fc23df158c9f0645b2d7b65c), [`4783b30`](https://github.com/mastra-ai/mastra/commit/4783b3063efea887825514b783ba27f67912c26d), [`a739d0c`](https://github.com/mastra-ai/mastra/commit/a739d0c8b37cd89569e04a6ca0827083c6167e19), [`a9c4cb7`](https://github.com/mastra-ai/mastra/commit/a9c4cb7d6a35de23ca51066f166a66e0e4cca418), [`603e927`](https://github.com/mastra-ai/mastra/commit/603e9279db8bf8a46caf83881c6b7389ccffff7e), [`cd45982`](https://github.com/mastra-ai/mastra/commit/cd4598291cda128a88738734ae6cbef076ebdebd), [`874f74d`](https://github.com/mastra-ai/mastra/commit/874f74da4b1acf6517f18132d035612c3ecc394a), [`b728a45`](https://github.com/mastra-ai/mastra/commit/b728a45ab3dba59da0f5ee36b81fe246659f305d), [`0baf2ba`](https://github.com/mastra-ai/mastra/commit/0baf2bab8420277072ef1f95df5ea7b0a2f61fe7), [`10e633a`](https://github.com/mastra-ai/mastra/commit/10e633a07d333466d9734c97acfc3dbf757ad2d0), [`a6d69c5`](https://github.com/mastra-ai/mastra/commit/a6d69c5fb50c0875b46275811fece5862f03c6a0), [`84199af`](https://github.com/mastra-ai/mastra/commit/84199af8673f6f9cb59286ffb5477a41932775de), [`7f431af`](https://github.com/mastra-ai/mastra/commit/7f431afd586b7d3265075e73106eb73167edbb86), [`26e968d`](https://github.com/mastra-ai/mastra/commit/26e968db2171ded9e4d47aa1b4f19e1e771158d0), [`cbd3fb6`](https://github.com/mastra-ai/mastra/commit/cbd3fb65adb03a7c0df193cb998aed5ac56675ee)]:
|
|
497
|
-
- @mastra/core@0.20.1
|
|
498
|
-
- @mastra/deployer@0.20.1
|
|
499
|
-
|
|
500
|
-
## 0.20.1-alpha.4
|
|
501
|
-
|
|
502
|
-
... 671 more lines hidden. See full changelog in package directory.
|
|
502
|
+
... 679 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @mastra/deployer
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`c8417b4`](https://github.com/mastra-ai/mastra/commit/c8417b41d9f3486854dc7842d977fbe5e2166264), [`dd4f34c`](https://github.com/mastra-ai/mastra/commit/dd4f34c78cbae24063463475b0619575c415f9b8)]:
|
|
8
|
+
- @mastra/core@1.0.0-beta.23
|
|
9
|
+
- @mastra/server@1.0.0-beta.23
|
|
10
|
+
|
|
3
11
|
## 1.0.0-beta.22
|
|
4
12
|
|
|
5
13
|
### Major Changes
|
|
@@ -490,13 +498,5 @@
|
|
|
490
498
|
threadId: 'thread-1',
|
|
491
499
|
orderBy: { field: 'createdAt', direction: 'DESC' },
|
|
492
500
|
});
|
|
493
|
-
```
|
|
494
|
-
|
|
495
|
-
## Client SDK
|
|
496
|
-
|
|
497
|
-
### BREAKING: Renamed `client.getThreadMessages()` → `client.listThreadMessages()`
|
|
498
|
-
|
|
499
|
-
**Migration:**
|
|
500
|
-
|
|
501
501
|
|
|
502
|
-
...
|
|
502
|
+
... 5353 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`c8417b4`](https://github.com/mastra-ai/mastra/commit/c8417b41d9f3486854dc7842d977fbe5e2166264), [`dd4f34c`](https://github.com/mastra-ai/mastra/commit/dd4f34c78cbae24063463475b0619575c415f9b8)]:
|
|
8
|
+
- @mastra/core@1.0.0-beta.23
|
|
9
|
+
|
|
3
10
|
## 1.0.0-beta.22
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -492,11 +499,4 @@
|
|
|
492
499
|
|
|
493
500
|
### Patch Changes
|
|
494
501
|
|
|
495
|
-
|
|
496
|
-
- @mastra/mcp@0.13.2-alpha.0
|
|
497
|
-
- @mastra/core@0.19.0-alpha.1
|
|
498
|
-
|
|
499
|
-
## 0.13.25-alpha.0
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
... 2163 more lines hidden. See full changelog in package directory.
|
|
502
|
+
... 2170 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @mastra/playground-ui
|
|
2
2
|
|
|
3
|
+
## 7.0.0-beta.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`c8417b4`](https://github.com/mastra-ai/mastra/commit/c8417b41d9f3486854dc7842d977fbe5e2166264), [`dd4f34c`](https://github.com/mastra-ai/mastra/commit/dd4f34c78cbae24063463475b0619575c415f9b8)]:
|
|
8
|
+
- @mastra/core@1.0.0-beta.23
|
|
9
|
+
- @mastra/client-js@1.0.0-beta.23
|
|
10
|
+
- @mastra/react@0.1.0-beta.23
|
|
11
|
+
|
|
3
12
|
## 7.0.0-beta.22
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -489,14 +498,5 @@
|
|
|
489
498
|
|
|
490
499
|
This is distinct from `status: 'failed'` which indicates an unexpected error. A tripwire status means a processor intentionally stopped execution (e.g., for content moderation).
|
|
491
500
|
|
|
492
|
-
- Updated dependencies [[`38380b6`](https://github.com/mastra-ai/mastra/commit/38380b60fca905824bdf6b43df307a58efb1aa15), [`798d0c7`](https://github.com/mastra-ai/mastra/commit/798d0c740232653b1d754870e6b43a55c364ffe2), [`ffe84d5`](https://github.com/mastra-ai/mastra/commit/ffe84d54f3b0f85167fe977efd027dba027eb998), [`2c212e7`](https://github.com/mastra-ai/mastra/commit/2c212e704c90e2db83d4109e62c03f0f6ebd2667), [`4ca4306`](https://github.com/mastra-ai/mastra/commit/4ca430614daa5fa04730205a302a43bf4accfe9f), [`3bf6c5f`](https://github.com/mastra-ai/mastra/commit/3bf6c5f104c25226cd84e0c77f9dec15f2cac2db), [`3bf6c5f`](https://github.com/mastra-ai/mastra/commit/3bf6c5f104c25226cd84e0c77f9dec15f2cac2db)]:
|
|
493
|
-
- @mastra/core@1.0.0-beta.11
|
|
494
|
-
- @mastra/client-js@1.0.0-beta.11
|
|
495
|
-
- @mastra/ai-sdk@1.0.0-beta.8
|
|
496
|
-
- @mastra/react@0.1.0-beta.11
|
|
497
|
-
|
|
498
|
-
## 7.0.0-beta.10
|
|
499
|
-
|
|
500
|
-
### Minor Changes
|
|
501
501
|
|
|
502
|
-
...
|
|
502
|
+
... 4691 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @mastra/react-hooks
|
|
2
2
|
|
|
3
|
+
## 0.1.0-beta.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies:
|
|
8
|
+
- @mastra/client-js@1.0.0-beta.23
|
|
9
|
+
|
|
3
10
|
## 0.1.0-beta.22
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -492,11 +499,4 @@
|
|
|
492
499
|
|
|
493
500
|
- Gracefully fix errors in react-sdk when error is an object ([#8703](https://github.com/mastra-ai/mastra/pull/8703))
|
|
494
501
|
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
- Improve the surface API of the react sdk ([#8715](https://github.com/mastra-ai/mastra/pull/8715))
|
|
498
|
-
|
|
499
|
-
- Move react and react-dom deps to peer and dev deps ([#8698](https://github.com/mastra-ai/mastra/pull/8698))
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
... 209 more lines hidden. See full changelog in package directory.
|
|
502
|
+
... 216 more lines hidden. See full changelog in package directory.
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @mastra/server
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`c8417b4`](https://github.com/mastra-ai/mastra/commit/c8417b41d9f3486854dc7842d977fbe5e2166264), [`dd4f34c`](https://github.com/mastra-ai/mastra/commit/dd4f34c78cbae24063463475b0619575c415f9b8)]:
|
|
8
|
+
- @mastra/core@1.0.0-beta.23
|
|
9
|
+
|
|
3
10
|
## 1.0.0-beta.22
|
|
4
11
|
|
|
5
12
|
### Major Changes
|
|
@@ -491,12 +498,5 @@
|
|
|
491
498
|
|
|
492
499
|
// Get all fields but without nested workflow data (faster)
|
|
493
500
|
const resultWithoutNested = await workflow.runExecutionResult(runId, {
|
|
494
|
-
withNestedWorkflows: false,
|
|
495
|
-
});
|
|
496
|
-
|
|
497
|
-
// Get specific fields without nested workflow data
|
|
498
|
-
const optimized = await workflow.runExecutionResult(runId, {
|
|
499
|
-
fields: ['status', 'steps'],
|
|
500
|
-
withNestedWorkflows: false,
|
|
501
501
|
|
|
502
|
-
...
|
|
502
|
+
... 4854 more lines hidden. See full changelog in package directory.
|
|
@@ -259,25 +259,6 @@ Reserved fields such as `input`, `output`, `sessionId`, thread/user IDs, and Ope
|
|
|
259
259
|
|
|
260
260
|
This exporter implements the [OpenInference Semantic Conventions](https://github.com/Arize-ai/openinference/tree/main/spec) for generative AI applications, providing standardized trace structure across different observability platforms.
|
|
261
261
|
|
|
262
|
-
## Using Tags
|
|
263
|
-
|
|
264
|
-
Tags help you categorize and filter traces in Phoenix and Arize AX. Add tags when executing agents or workflows:
|
|
265
|
-
|
|
266
|
-
```typescript
|
|
267
|
-
const result = await agent.generate({
|
|
268
|
-
messages: [{ role: "user", content: "Hello" }],
|
|
269
|
-
tracingOptions: {
|
|
270
|
-
tags: ["production", "experiment-v2", "user-request"],
|
|
271
|
-
},
|
|
272
|
-
});
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
Tags appear as the `tag.tags` attribute following OpenInference conventions and can be used to filter and search traces. Common use cases include:
|
|
276
|
-
|
|
277
|
-
- Environment labels: `"production"`, `"staging"`
|
|
278
|
-
- Experiment tracking: `"experiment-v1"`, `"control-group"`
|
|
279
|
-
- Priority levels: `"priority-high"`, `"batch-job"`
|
|
280
|
-
|
|
281
262
|
## Related
|
|
282
263
|
|
|
283
264
|
- [Tracing Overview](/docs/v1/observability/tracing/overview)
|
|
@@ -94,25 +94,6 @@ new BraintrustExporter({
|
|
|
94
94
|
});
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
## Using Tags
|
|
98
|
-
|
|
99
|
-
Tags help you categorize and filter traces in the Braintrust dashboard. Add tags when executing agents or workflows:
|
|
100
|
-
|
|
101
|
-
```typescript
|
|
102
|
-
const result = await agent.generate({
|
|
103
|
-
messages: [{ role: "user", content: "Hello" }],
|
|
104
|
-
tracingOptions: {
|
|
105
|
-
tags: ["production", "experiment-v2", "user-request"],
|
|
106
|
-
},
|
|
107
|
-
});
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Tags appear in Braintrust's trace view and can be used to filter and search traces. Common use cases include:
|
|
111
|
-
|
|
112
|
-
- Environment labels: `"production"`, `"staging"`
|
|
113
|
-
- Experiment tracking: `"experiment-v1"`, `"control-group"`
|
|
114
|
-
- Priority levels: `"priority-high"`, `"batch-job"`
|
|
115
|
-
|
|
116
97
|
## Related
|
|
117
98
|
|
|
118
99
|
- [Tracing Overview](/docs/v1/observability/tracing/overview)
|
|
@@ -83,19 +83,6 @@ export const mastra = new Mastra({
|
|
|
83
83
|
});
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
## Using Tags
|
|
87
|
-
|
|
88
|
-
Tags help you categorize and filter traces in the Laminar dashboard. Add tags when executing agents or workflows:
|
|
89
|
-
|
|
90
|
-
```typescript
|
|
91
|
-
const result = await agent.generate({
|
|
92
|
-
messages: [{ role: "user", content: "Hello" }],
|
|
93
|
-
tracingOptions: {
|
|
94
|
-
tags: ["production", "experiment-v2", "user-request"],
|
|
95
|
-
},
|
|
96
|
-
});
|
|
97
|
-
```
|
|
98
|
-
|
|
99
86
|
## Related
|
|
100
87
|
|
|
101
88
|
- [Tracing Overview](/docs/v1/observability/tracing/overview)
|
|
@@ -148,10 +148,8 @@ import { buildTracingOptions } from "@mastra/observability";
|
|
|
148
148
|
import { withLangfusePrompt } from "@mastra/langfuse";
|
|
149
149
|
import { Langfuse } from "langfuse";
|
|
150
150
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
secretKey: process.env.LANGFUSE_SECRET_KEY!,
|
|
154
|
-
});
|
|
151
|
+
// Reads credentials from LANGFUSE_SECRET_KEY, LANGFUSE_PUBLIC_KEY, LANGFUSE_BASE_URL env vars
|
|
152
|
+
const langfuse = new Langfuse();
|
|
155
153
|
|
|
156
154
|
// Fetch the prompt from Langfuse Prompt Management
|
|
157
155
|
const prompt = await langfuse.getPrompt("customer-support");
|
|
@@ -162,15 +160,6 @@ export const supportAgent = new Agent({
|
|
|
162
160
|
model: "openai/gpt-4o",
|
|
163
161
|
defaultGenerateOptions: {
|
|
164
162
|
tracingOptions: buildTracingOptions(withLangfusePrompt(prompt)),
|
|
165
|
-
## Using Tags
|
|
166
|
-
|
|
167
|
-
Tags help you categorize and filter traces in the Langfuse dashboard. Add tags when executing agents or workflows:
|
|
168
|
-
|
|
169
|
-
```typescript
|
|
170
|
-
const result = await agent.generate({
|
|
171
|
-
messages: [{ role: "user", content: "Hello" }],
|
|
172
|
-
tracingOptions: {
|
|
173
|
-
tags: ["production", "experiment-v2", "user-request"],
|
|
174
163
|
},
|
|
175
164
|
});
|
|
176
165
|
```
|
|
@@ -208,12 +197,6 @@ You can link prompts using either:
|
|
|
208
197
|
- All three fields
|
|
209
198
|
|
|
210
199
|
When set on a `MODEL_GENERATION` span, the Langfuse exporter automatically links the generation to the corresponding prompt.
|
|
211
|
-
Tags appear in Langfuse's trace view and can be used to filter and search traces. Common use cases include:
|
|
212
|
-
|
|
213
|
-
- Environment labels: `"production"`, `"staging"`
|
|
214
|
-
- Experiment tracking: `"experiment-v1"`, `"control-group"`
|
|
215
|
-
- Priority levels: `"priority-high"`, `"batch-job"`
|
|
216
|
-
- User segments: `"beta-user"`, `"enterprise"`
|
|
217
200
|
|
|
218
201
|
## Related
|
|
219
202
|
|
|
@@ -449,25 +449,6 @@ Install the suggested package for your provider.
|
|
|
449
449
|
2. **Invalid endpoint**: Check endpoint format matches provider requirements
|
|
450
450
|
3. **Authentication failures**: Verify API keys and headers are correct
|
|
451
451
|
|
|
452
|
-
## Using Tags
|
|
453
|
-
|
|
454
|
-
Tags help you categorize and filter traces in your observability platform. Add tags when executing agents or workflows:
|
|
455
|
-
|
|
456
|
-
```typescript
|
|
457
|
-
const result = await agent.generate({
|
|
458
|
-
messages: [{ role: "user", content: "Hello" }],
|
|
459
|
-
tracingOptions: {
|
|
460
|
-
tags: ["production", "experiment-v2", "user-request"],
|
|
461
|
-
},
|
|
462
|
-
});
|
|
463
|
-
```
|
|
464
|
-
|
|
465
|
-
Tags are exported as a JSON string in the `mastra.tags` span attribute for broad backend compatibility. Common use cases include:
|
|
466
|
-
|
|
467
|
-
- Environment labels: `"production"`, `"staging"`
|
|
468
|
-
- Experiment tracking: `"experiment-v1"`, `"control-group"`
|
|
469
|
-
- Priority levels: `"priority-high"`, `"batch-job"`
|
|
470
|
-
|
|
471
452
|
## Related
|
|
472
453
|
|
|
473
454
|
- [Tracing Overview](/docs/v1/observability/tracing/overview)
|
|
@@ -131,26 +131,6 @@ new PosthogExporter({
|
|
|
131
131
|
});
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
## Using Tags
|
|
135
|
-
|
|
136
|
-
Tags help you categorize and filter traces in PostHog's AI analytics. Add tags when executing agents or workflows:
|
|
137
|
-
|
|
138
|
-
```typescript
|
|
139
|
-
const result = await agent.generate({
|
|
140
|
-
messages: [{ role: "user", content: "Hello" }],
|
|
141
|
-
tracingOptions: {
|
|
142
|
-
tags: ["production", "experiment-v2", "user-request"],
|
|
143
|
-
},
|
|
144
|
-
});
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
Tags are added as event properties where the tag name is the key and the value is set to `true`. In PostHog's trace view, filter by a tag using the `is set` filter (e.g., "production is set" shows all traces with the production tag). Common use cases include:
|
|
148
|
-
|
|
149
|
-
- Environment labels: `"production"`, `"staging"`
|
|
150
|
-
- Experiment tracking: `"experiment-v1"`, `"control-group"`
|
|
151
|
-
- Priority levels: `"priority-high"`, `"batch-job"`
|
|
152
|
-
- User segments: `"beta-user"`, `"enterprise"`
|
|
153
|
-
|
|
154
134
|
## Related
|
|
155
135
|
|
|
156
136
|
- [Tracing Overview](/docs/v1/observability/tracing/overview)
|
|
@@ -86,9 +86,10 @@ In addition to the internal exporters, Mastra supports integration with popular
|
|
|
86
86
|
- **[Laminar](/docs/v1/observability/tracing/exporters/laminar)** - Sends traces to Laminar via OTLP/HTTP (protobuf) with Laminar-native span attributes + scorer support
|
|
87
87
|
- **[Langfuse](/docs/v1/observability/tracing/exporters/langfuse)** - Sends traces to the Langfuse open-source LLM engineering platform
|
|
88
88
|
- **[LangSmith](/docs/v1/observability/tracing/exporters/langsmith)** - Pushes traces into LangSmith's observability and evaluation toolkit
|
|
89
|
-
- **[
|
|
90
|
-
- Supports: Dash0, Datadog, MLflow, New Relic, SigNoz, Traceloop, Zipkin, and others!
|
|
89
|
+
- **[PostHog](/docs/v1/observability/tracing/exporters/posthog)** - Sends traces to PostHog for AI analytics and product insights
|
|
91
90
|
- **[Sentry](/docs/v1/observability/tracing/exporters/sentry)** - Sends traces to Sentry for AI tracing and monitoring using OpenTelemetry semantic conventions
|
|
91
|
+
- **[OpenTelemetry](/docs/v1/observability/tracing/exporters/otel)** - Deliver traces to any OpenTelemetry-compatible observability system
|
|
92
|
+
- Supports: Dash0, MLflow, New Relic, SigNoz, Traceloop, Zipkin, and others!
|
|
92
93
|
|
|
93
94
|
## Bridges
|
|
94
95
|
|
|
@@ -620,15 +621,29 @@ execute: async (inputData, context) => {
|
|
|
620
621
|
|
|
621
622
|
Child spans automatically inherit the trace context from their parent, maintaining the relationship hierarchy in your observability platform.
|
|
622
623
|
|
|
623
|
-
## Span
|
|
624
|
+
## Span Formatting
|
|
625
|
+
|
|
626
|
+
Mastra provides two ways to transform span data before it reaches your observability platform: **span processors** and **custom span formatters**. Both allow you to modify, filter, or enrich trace data, but they operate at different levels and serve different purposes.
|
|
627
|
+
|
|
628
|
+
| Feature | Span Processors | Custom Span Formatters |
|
|
629
|
+
| --- | --- | --- |
|
|
630
|
+
| Configuration level | Observability config | Per-exporter |
|
|
631
|
+
| Operates on | Internal `Span` object | Exported `ExportedSpan` data |
|
|
632
|
+
| Applies to | All exporters | Single exporter |
|
|
633
|
+
| Async support | No | Yes |
|
|
634
|
+
| Use case | Security, filtering, enrichment | Platform-specific formatting, async enrichment |
|
|
624
635
|
|
|
625
|
-
|
|
636
|
+
Use **span processors** for synchronous transformations that should apply to all exporters (like redacting sensitive data). Use **custom span formatters** when different exporters need different representations of the same data (like plain text for one platform and structured data for another), or when you need to perform asynchronous operations like fetching data from external APIs.
|
|
626
637
|
|
|
627
|
-
###
|
|
638
|
+
### Span Processors
|
|
639
|
+
|
|
640
|
+
Span processors transform, filter, or enrich trace data before it's exported. They act as a pipeline between span creation and export, enabling you to modify spans for security, compliance, or debugging purposes. Processors run once and affect all exporters.
|
|
641
|
+
|
|
642
|
+
#### Built-in Processors
|
|
628
643
|
|
|
629
644
|
- [Sensitive Data Filter](/docs/v1/observability/tracing/processors/sensitive-data-filter) redacts sensitive information. It is enabled in the default observability config.
|
|
630
645
|
|
|
631
|
-
|
|
646
|
+
#### Creating Custom Processors
|
|
632
647
|
|
|
633
648
|
You can create custom span processors by implementing the `SpanOutputProcessor` interface. Here's a simple example that converts all input text in spans to lowercase:
|
|
634
649
|
|
|
@@ -661,14 +676,150 @@ export const mastra = new Mastra({
|
|
|
661
676
|
});
|
|
662
677
|
```
|
|
663
678
|
|
|
664
|
-
Processors are executed in the order they're defined, allowing you to chain multiple transformations. Common use cases
|
|
679
|
+
Processors are executed in the order they're defined, allowing you to chain multiple transformations. Common use cases include:
|
|
665
680
|
|
|
681
|
+
- Redacting sensitive data (passwords, tokens, API keys)
|
|
666
682
|
- Adding environment-specific metadata
|
|
667
683
|
- Filtering out spans based on criteria
|
|
668
684
|
- Normalizing data formats
|
|
669
|
-
- Sampling high-volume traces
|
|
670
685
|
- Enriching spans with business context
|
|
671
686
|
|
|
687
|
+
### Custom Span Formatters
|
|
688
|
+
|
|
689
|
+
Custom span formatters transform how spans appear in specific observability platforms. Unlike span processors, formatters are configured per-exporter, allowing different formatting for different destinations. Formatters support both synchronous and asynchronous operations.
|
|
690
|
+
|
|
691
|
+
#### Use Cases
|
|
692
|
+
|
|
693
|
+
- **Extract plain text from AI SDK messages** - Convert structured message arrays to readable text
|
|
694
|
+
- **Transform input/output formats** - Customize how data appears in specific platforms
|
|
695
|
+
- **Platform-specific field mapping** - Add or remove fields based on platform requirements
|
|
696
|
+
- **Async data enrichment** - Fetch additional context from external APIs or databases
|
|
697
|
+
|
|
698
|
+
#### Configuration
|
|
699
|
+
|
|
700
|
+
Add a `customSpanFormatter` to any exporter configuration:
|
|
701
|
+
|
|
702
|
+
```ts title="src/mastra/index.ts"
|
|
703
|
+
import { BraintrustExporter } from "@mastra/braintrust";
|
|
704
|
+
import { LangfuseExporter } from "@mastra/langfuse";
|
|
705
|
+
import { SpanType } from "@mastra/core/observability";
|
|
706
|
+
import type { CustomSpanFormatter } from "@mastra/core/observability";
|
|
707
|
+
|
|
708
|
+
// Formatter that extracts plain text from AI messages
|
|
709
|
+
const plainTextFormatter: CustomSpanFormatter = (span) => {
|
|
710
|
+
if (span.type === SpanType.AGENT_RUN && Array.isArray(span.input)) {
|
|
711
|
+
const userMessage = span.input.find((m) => m.role === "user");
|
|
712
|
+
return {
|
|
713
|
+
...span,
|
|
714
|
+
input: userMessage?.content ?? span.input,
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
return span;
|
|
718
|
+
};
|
|
719
|
+
|
|
720
|
+
export const mastra = new Mastra({
|
|
721
|
+
observability: new Observability({
|
|
722
|
+
configs: {
|
|
723
|
+
default: {
|
|
724
|
+
serviceName: "my-service",
|
|
725
|
+
exporters: [
|
|
726
|
+
// Braintrust gets plain text formatting
|
|
727
|
+
new BraintrustExporter({
|
|
728
|
+
customSpanFormatter: plainTextFormatter,
|
|
729
|
+
}),
|
|
730
|
+
// Langfuse keeps the original structured format
|
|
731
|
+
new LangfuseExporter(),
|
|
732
|
+
],
|
|
733
|
+
},
|
|
734
|
+
},
|
|
735
|
+
}),
|
|
736
|
+
});
|
|
737
|
+
```
|
|
738
|
+
|
|
739
|
+
#### Chaining Multiple Formatters
|
|
740
|
+
|
|
741
|
+
Use `chainFormatters` to combine multiple formatters. Chains support both sync and async formatters:
|
|
742
|
+
|
|
743
|
+
```ts
|
|
744
|
+
import { chainFormatters } from "@mastra/observability";
|
|
745
|
+
|
|
746
|
+
const inputFormatter: CustomSpanFormatter = (span) => ({
|
|
747
|
+
...span,
|
|
748
|
+
input: extractPlainText(span.input),
|
|
749
|
+
});
|
|
750
|
+
|
|
751
|
+
const outputFormatter: CustomSpanFormatter = (span) => ({
|
|
752
|
+
...span,
|
|
753
|
+
output: extractPlainText(span.output),
|
|
754
|
+
});
|
|
755
|
+
|
|
756
|
+
const exporter = new BraintrustExporter({
|
|
757
|
+
customSpanFormatter: chainFormatters([inputFormatter, outputFormatter]),
|
|
758
|
+
});
|
|
759
|
+
```
|
|
760
|
+
|
|
761
|
+
#### Async Formatters
|
|
762
|
+
|
|
763
|
+
Custom span formatters support asynchronous operations, enabling use cases like fetching data from external APIs or databases to enrich your spans:
|
|
764
|
+
|
|
765
|
+
```ts
|
|
766
|
+
import type { CustomSpanFormatter } from "@mastra/core/observability";
|
|
767
|
+
|
|
768
|
+
// Async formatter that enriches spans with user data
|
|
769
|
+
const userEnrichmentFormatter: CustomSpanFormatter = async (span) => {
|
|
770
|
+
const userId = span.metadata?.userId;
|
|
771
|
+
if (!userId) return span;
|
|
772
|
+
|
|
773
|
+
// Fetch user data from your API or database
|
|
774
|
+
const userData = await fetchUserData(userId);
|
|
775
|
+
|
|
776
|
+
return {
|
|
777
|
+
...span,
|
|
778
|
+
metadata: {
|
|
779
|
+
...span.metadata,
|
|
780
|
+
userName: userData.name,
|
|
781
|
+
userEmail: userData.email,
|
|
782
|
+
department: userData.department,
|
|
783
|
+
},
|
|
784
|
+
};
|
|
785
|
+
};
|
|
786
|
+
|
|
787
|
+
// Async formatter that looks up additional context
|
|
788
|
+
const contextEnrichmentFormatter: CustomSpanFormatter = async (span) => {
|
|
789
|
+
if (span.type !== SpanType.AGENT_RUN) return span;
|
|
790
|
+
|
|
791
|
+
// Fetch experiment configuration
|
|
792
|
+
const experimentConfig = await getExperimentConfig(span.metadata?.experimentId);
|
|
793
|
+
|
|
794
|
+
return {
|
|
795
|
+
...span,
|
|
796
|
+
metadata: {
|
|
797
|
+
...span.metadata,
|
|
798
|
+
experimentVariant: experimentConfig?.variant,
|
|
799
|
+
experimentGroup: experimentConfig?.group,
|
|
800
|
+
},
|
|
801
|
+
};
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
// Use async formatters with an exporter
|
|
805
|
+
const exporter = new BraintrustExporter({
|
|
806
|
+
customSpanFormatter: userEnrichmentFormatter,
|
|
807
|
+
});
|
|
808
|
+
|
|
809
|
+
// Or chain sync and async formatters together
|
|
810
|
+
const exporter = new LangfuseExporter({
|
|
811
|
+
customSpanFormatter: chainFormatters([
|
|
812
|
+
plainTextFormatter, // sync
|
|
813
|
+
userEnrichmentFormatter, // async
|
|
814
|
+
contextEnrichmentFormatter, // async
|
|
815
|
+
]),
|
|
816
|
+
});
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
:::note
|
|
820
|
+
Async formatters add latency to span export. Keep async operations fast (under 100ms) to avoid slowing down your application. Consider using caching for frequently accessed data.
|
|
821
|
+
:::
|
|
822
|
+
|
|
672
823
|
## Serialization Options
|
|
673
824
|
|
|
674
825
|
Serialization options control how span data (input, output, and attributes) is truncated before export. This is useful when working with large payloads, deeply nested objects, or when you need to optimize trace storage.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @mastra/mcp-docs-server
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.23
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`c8417b4`](https://github.com/mastra-ai/mastra/commit/c8417b41d9f3486854dc7842d977fbe5e2166264), [`dd4f34c`](https://github.com/mastra-ai/mastra/commit/dd4f34c78cbae24063463475b0619575c415f9b8)]:
|
|
8
|
+
- @mastra/core@1.0.0-beta.23
|
|
9
|
+
|
|
3
10
|
## 1.0.0-beta.22
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/mcp-docs-server",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.23",
|
|
4
4
|
"description": "MCP server for accessing Mastra.ai documentation, changelogs, and news.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"jsdom": "^26.1.0",
|
|
30
30
|
"local-pkg": "^1.1.2",
|
|
31
31
|
"zod": "^3.25.76",
|
|
32
|
-
"@mastra/core": "1.0.0-beta.
|
|
32
|
+
"@mastra/core": "1.0.0-beta.23",
|
|
33
33
|
"@mastra/mcp": "^1.0.0-beta.10"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"typescript": "^5.9.3",
|
|
48
48
|
"vitest": "4.0.16",
|
|
49
49
|
"@internal/lint": "0.0.53",
|
|
50
|
-
"@mastra/core": "1.0.0-beta.
|
|
50
|
+
"@mastra/core": "1.0.0-beta.23"
|
|
51
51
|
},
|
|
52
52
|
"homepage": "https://mastra.ai",
|
|
53
53
|
"repository": {
|