@mastra/deepeval 0.0.0-esbuild-bundle-worker-20260807173433
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 +90 -0
- package/LICENSE.md +30 -0
- package/README.md +91 -0
- package/dist/index.cjs +30 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +28 -0
- package/dist/index.js.map +1 -0
- package/dist/tracing.d.ts +16 -0
- package/dist/tracing.d.ts.map +1 -0
- package/package.json +64 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# @mastra/deepeval
|
|
2
|
+
|
|
3
|
+
## 0.0.0-esbuild-bundle-worker-20260807173433
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`e7109ee`](https://github.com/mastra-ai/mastra/commit/e7109ee6f731bacc79c885906f3c7dca8d8f013a), [`45a9147`](https://github.com/mastra-ai/mastra/commit/45a914741f578754d79d8b7de7b4e4f304d8e14a), [`1bdfde1`](https://github.com/mastra-ai/mastra/commit/1bdfde1f4061b7c0550253a1512a2118debe7996), [`772c0c8`](https://github.com/mastra-ai/mastra/commit/772c0c897cec383258de2e6178147f8014767c7b), [`578bf2e`](https://github.com/mastra-ai/mastra/commit/578bf2e6a88e9d5b8bf502204e15a95dfbb679ae), [`289f4ce`](https://github.com/mastra-ai/mastra/commit/289f4ce16e3293370440172132c52ee787cbc09f), [`b4c89b4`](https://github.com/mastra-ai/mastra/commit/b4c89b4371b0c86da57403ad1a3b3ef0681f3128), [`06b2d87`](https://github.com/mastra-ai/mastra/commit/06b2d87e63bcdd0ed59215c6789692b9b12de376), [`ac01d63`](https://github.com/mastra-ai/mastra/commit/ac01d6355974aec73fdb8781449ed12bac582094), [`e44e8f3`](https://github.com/mastra-ai/mastra/commit/e44e8f370b66c339ddcaba946d33da6d3c3f06cd), [`a810a05`](https://github.com/mastra-ai/mastra/commit/a810a058f62ad407cfc1701e0be36ae91145d7cf), [`cd1315c`](https://github.com/mastra-ai/mastra/commit/cd1315c78b6c2269e45ee81dd194d1a29763bf52), [`26ff3b9`](https://github.com/mastra-ai/mastra/commit/26ff3b9144132bd8570e4796d436fb57a9a2bf24), [`990611b`](https://github.com/mastra-ai/mastra/commit/990611ba76eb876d86c9c594371ae5f02f94b432), [`c967a5e`](https://github.com/mastra-ai/mastra/commit/c967a5eec150c5dc5418c4a4388982d1fb7ad27c), [`f8da216`](https://github.com/mastra-ai/mastra/commit/f8da21633e7eb0e31c9ce0fc30567870d19416d3), [`ed5d606`](https://github.com/mastra-ai/mastra/commit/ed5d606739c5e3fbdfa9f272df7809aa5ab43b1d), [`f53d5bd`](https://github.com/mastra-ai/mastra/commit/f53d5bd4885b29e4ac29a428a6044088ea8d6aa3), [`6104347`](https://github.com/mastra-ai/mastra/commit/61043473ba6bfd0a25156824e853e13165562e6c), [`bda2235`](https://github.com/mastra-ai/mastra/commit/bda22353ee28f2df0eaea555f7cae1549f979c0b), [`45bfb88`](https://github.com/mastra-ai/mastra/commit/45bfb88fd52f1dd3be20e2a38905777c96499c90), [`e3b9307`](https://github.com/mastra-ai/mastra/commit/e3b9307098daefbfae2a52ae2ef51bc9fc701190), [`d6834c5`](https://github.com/mastra-ai/mastra/commit/d6834c5a7866b16734d23900163c2414ed70d791), [`cd1315c`](https://github.com/mastra-ai/mastra/commit/cd1315c78b6c2269e45ee81dd194d1a29763bf52), [`a7eb4a1`](https://github.com/mastra-ai/mastra/commit/a7eb4a11450f6170274ed5141bffe821d4fdd5a6), [`c52d346`](https://github.com/mastra-ai/mastra/commit/c52d3462ec831a5d95926ecd3d3373f5928ad2e5), [`0023e79`](https://github.com/mastra-ai/mastra/commit/0023e7919431078280abd11c89d1edeae35fcc69), [`c2ad51e`](https://github.com/mastra-ai/mastra/commit/c2ad51e2467f901eecba8c9f4a45e22a50bd7c18), [`2f9ef3f`](https://github.com/mastra-ai/mastra/commit/2f9ef3f4ca06fc2dcdd5088c26b7f4da6a016791), [`e7eefcb`](https://github.com/mastra-ai/mastra/commit/e7eefcb162cda7c493e8c3bf43050ead0efbcb2c), [`4d7aca2`](https://github.com/mastra-ai/mastra/commit/4d7aca2fe75f225c83d1502d63079568e6ec163f), [`c4ec889`](https://github.com/mastra-ai/mastra/commit/c4ec889561c0264c43f66d04d587bee4ce35e792), [`3dc97ea`](https://github.com/mastra-ai/mastra/commit/3dc97ea415fad353b48a13095fad1835933cc12a), [`3d01cd3`](https://github.com/mastra-ai/mastra/commit/3d01cd387321b6f9c5cac31d487c84bf51b19c78), [`7bf3086`](https://github.com/mastra-ai/mastra/commit/7bf308663f0115ca74ad20554ade740f06640859), [`a8dd139`](https://github.com/mastra-ai/mastra/commit/a8dd1391a9fe9a6632c25809ef236980afa9a020), [`9be8878`](https://github.com/mastra-ai/mastra/commit/9be8878dcf0388e84fc4873e0eec27bd49b881a4), [`e5786be`](https://github.com/mastra-ai/mastra/commit/e5786be02bb903073082bd9d6da880ebaacc343f), [`2093fbd`](https://github.com/mastra-ai/mastra/commit/2093fbd53bb744bae19ec89f6d73db9a66fbe8a7), [`e7a5da4`](https://github.com/mastra-ai/mastra/commit/e7a5da4ef8e4dd452d2f232961b4e682a85ffe43), [`7b4393d`](https://github.com/mastra-ai/mastra/commit/7b4393d557411fdcf07b0e30e5acaf7cc85154ae)]:
|
|
8
|
+
- @mastra/core@0.0.0-esbuild-bundle-worker-20260807173433
|
|
9
|
+
- @mastra/observability@0.0.0-esbuild-bundle-worker-20260807173433
|
|
10
|
+
|
|
11
|
+
## 0.1.1-alpha.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`1bdfde1`](https://github.com/mastra-ai/mastra/commit/1bdfde1f4061b7c0550253a1512a2118debe7996), [`b4c89b4`](https://github.com/mastra-ai/mastra/commit/b4c89b4371b0c86da57403ad1a3b3ef0681f3128), [`e44e8f3`](https://github.com/mastra-ai/mastra/commit/e44e8f370b66c339ddcaba946d33da6d3c3f06cd), [`c967a5e`](https://github.com/mastra-ai/mastra/commit/c967a5eec150c5dc5418c4a4388982d1fb7ad27c), [`f53d5bd`](https://github.com/mastra-ai/mastra/commit/f53d5bd4885b29e4ac29a428a6044088ea8d6aa3), [`bda2235`](https://github.com/mastra-ai/mastra/commit/bda22353ee28f2df0eaea555f7cae1549f979c0b), [`a7eb4a1`](https://github.com/mastra-ai/mastra/commit/a7eb4a11450f6170274ed5141bffe821d4fdd5a6), [`2f9ef3f`](https://github.com/mastra-ai/mastra/commit/2f9ef3f4ca06fc2dcdd5088c26b7f4da6a016791), [`e7eefcb`](https://github.com/mastra-ai/mastra/commit/e7eefcb162cda7c493e8c3bf43050ead0efbcb2c), [`4d7aca2`](https://github.com/mastra-ai/mastra/commit/4d7aca2fe75f225c83d1502d63079568e6ec163f), [`c4ec889`](https://github.com/mastra-ai/mastra/commit/c4ec889561c0264c43f66d04d587bee4ce35e792), [`9be8878`](https://github.com/mastra-ai/mastra/commit/9be8878dcf0388e84fc4873e0eec27bd49b881a4)]:
|
|
16
|
+
- @mastra/observability@1.16.6-alpha.1
|
|
17
|
+
- @mastra/core@1.58.0-alpha.2
|
|
18
|
+
|
|
19
|
+
## 0.1.1-alpha.0
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [[`e7109ee`](https://github.com/mastra-ai/mastra/commit/e7109ee6f731bacc79c885906f3c7dca8d8f013a), [`772c0c8`](https://github.com/mastra-ai/mastra/commit/772c0c897cec383258de2e6178147f8014767c7b), [`578bf2e`](https://github.com/mastra-ai/mastra/commit/578bf2e6a88e9d5b8bf502204e15a95dfbb679ae), [`06b2d87`](https://github.com/mastra-ai/mastra/commit/06b2d87e63bcdd0ed59215c6789692b9b12de376), [`ac01d63`](https://github.com/mastra-ai/mastra/commit/ac01d6355974aec73fdb8781449ed12bac582094), [`a810a05`](https://github.com/mastra-ai/mastra/commit/a810a058f62ad407cfc1701e0be36ae91145d7cf), [`26ff3b9`](https://github.com/mastra-ai/mastra/commit/26ff3b9144132bd8570e4796d436fb57a9a2bf24), [`f8da216`](https://github.com/mastra-ai/mastra/commit/f8da21633e7eb0e31c9ce0fc30567870d19416d3), [`6104347`](https://github.com/mastra-ai/mastra/commit/61043473ba6bfd0a25156824e853e13165562e6c), [`45bfb88`](https://github.com/mastra-ai/mastra/commit/45bfb88fd52f1dd3be20e2a38905777c96499c90), [`e3b9307`](https://github.com/mastra-ai/mastra/commit/e3b9307098daefbfae2a52ae2ef51bc9fc701190), [`d6834c5`](https://github.com/mastra-ai/mastra/commit/d6834c5a7866b16734d23900163c2414ed70d791), [`c52d346`](https://github.com/mastra-ai/mastra/commit/c52d3462ec831a5d95926ecd3d3373f5928ad2e5), [`0023e79`](https://github.com/mastra-ai/mastra/commit/0023e7919431078280abd11c89d1edeae35fcc69), [`c2ad51e`](https://github.com/mastra-ai/mastra/commit/c2ad51e2467f901eecba8c9f4a45e22a50bd7c18), [`3dc97ea`](https://github.com/mastra-ai/mastra/commit/3dc97ea415fad353b48a13095fad1835933cc12a), [`3d01cd3`](https://github.com/mastra-ai/mastra/commit/3d01cd387321b6f9c5cac31d487c84bf51b19c78), [`7bf3086`](https://github.com/mastra-ai/mastra/commit/7bf308663f0115ca74ad20554ade740f06640859), [`a8dd139`](https://github.com/mastra-ai/mastra/commit/a8dd1391a9fe9a6632c25809ef236980afa9a020), [`e5786be`](https://github.com/mastra-ai/mastra/commit/e5786be02bb903073082bd9d6da880ebaacc343f), [`2093fbd`](https://github.com/mastra-ai/mastra/commit/2093fbd53bb744bae19ec89f6d73db9a66fbe8a7), [`e7a5da4`](https://github.com/mastra-ai/mastra/commit/e7a5da4ef8e4dd452d2f232961b4e682a85ffe43), [`7b4393d`](https://github.com/mastra-ai/mastra/commit/7b4393d557411fdcf07b0e30e5acaf7cc85154ae)]:
|
|
24
|
+
- @mastra/core@1.58.0-alpha.1
|
|
25
|
+
- @mastra/observability@1.16.6-alpha.0
|
|
26
|
+
|
|
27
|
+
## 0.1.0
|
|
28
|
+
|
|
29
|
+
### Minor Changes
|
|
30
|
+
|
|
31
|
+
- Added the `@mastra/deepeval` observability exporter to send Mastra traces to Confident AI for evaluation and monitoring. ([#20599](https://github.com/mastra-ai/mastra/pull/20599))
|
|
32
|
+
|
|
33
|
+
Register it in your Mastra observability config:
|
|
34
|
+
|
|
35
|
+
```typescript
|
|
36
|
+
import { Mastra } from '@mastra/core';
|
|
37
|
+
import { Observability } from '@mastra/observability';
|
|
38
|
+
import { DeepEvalExporter } from '@mastra/deepeval';
|
|
39
|
+
|
|
40
|
+
export const mastra = new Mastra({
|
|
41
|
+
observability: new Observability({
|
|
42
|
+
configs: {
|
|
43
|
+
deepeval: {
|
|
44
|
+
serviceName: 'my-service',
|
|
45
|
+
exporters: [new DeepEvalExporter()],
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
}),
|
|
49
|
+
});
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Set `CONFIDENT_API_KEY` (and optionally `CONFIDENT_TRACE_ENVIRONMENT`) to send traces. Mastra spans map to Confident AI's `AGENT`, `LLM`, `TOOL`, `RETRIEVER`, and `CUSTOM` span types, with model, token counts, tool calls, and metric collections carried through.
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- Updated dependencies [[`8d2399b`](https://github.com/mastra-ai/mastra/commit/8d2399b638f8e0945cf2cda0187dbea8dcf0b784), [`c8002da`](https://github.com/mastra-ai/mastra/commit/c8002da7775c468e2965b6ff5f82045450fa8cb9), [`92be47f`](https://github.com/mastra-ai/mastra/commit/92be47fbd26ffccec0e2131ef7c1d9e70dd5ef4a), [`89200ba`](https://github.com/mastra-ai/mastra/commit/89200bafa05444bb7949b363ce7b743e29867561), [`3d6ae10`](https://github.com/mastra-ai/mastra/commit/3d6ae107c009a40cef08e83da6866c20783d7ac1), [`c950138`](https://github.com/mastra-ai/mastra/commit/c950138e72e4f317a40187e3800588731ab790ce), [`810c7e7`](https://github.com/mastra-ai/mastra/commit/810c7e74929989d8b8b5db52cd3af22cd0998af4), [`063c8b2`](https://github.com/mastra-ai/mastra/commit/063c8b2eb14e4e5ca021779bc33e8c3c031c8604), [`f9f9884`](https://github.com/mastra-ai/mastra/commit/f9f98848ee194dc71a787a709ec430b065cdc41b), [`e0904dc`](https://github.com/mastra-ai/mastra/commit/e0904dc538792e54e1806b70172e5900ac49bff4), [`9672fab`](https://github.com/mastra-ai/mastra/commit/9672fabfbcadb961a35c22a2d6722e077f7b24b9), [`f4e964c`](https://github.com/mastra-ai/mastra/commit/f4e964cad57057301d6bed5c55bcdd730175b941), [`1f7bbd7`](https://github.com/mastra-ai/mastra/commit/1f7bbd7785a8d230aad02454ecabeb4a0b2cc96f), [`e47ff36`](https://github.com/mastra-ai/mastra/commit/e47ff36945720f4ee4caa09f6e83514d7d188608), [`64d6781`](https://github.com/mastra-ai/mastra/commit/64d67814bccddd314f7e09643243821e57cb87b6), [`fb9a6ac`](https://github.com/mastra-ai/mastra/commit/fb9a6ac11c9560518742ece60b49d6b062845fd3), [`aa2cec8`](https://github.com/mastra-ai/mastra/commit/aa2cec8501f634d51c2f3ebfb3dd3aa7af8d2ca2), [`c848e65`](https://github.com/mastra-ai/mastra/commit/c848e655a64ff10331a8ceafafe7f18e70a0f092), [`2adf8eb`](https://github.com/mastra-ai/mastra/commit/2adf8eb4a70ed2b6cff2dd39281496ea0e025fac), [`0494489`](https://github.com/mastra-ai/mastra/commit/049448906e4c3d2d615bbe865b073a0d890ddb7c), [`8d1aeb8`](https://github.com/mastra-ai/mastra/commit/8d1aeb8acf7c20c4bb8e4d8e4bdc6569c83ac561), [`8264611`](https://github.com/mastra-ai/mastra/commit/8264611510e421b818bc7395dc2ae4d9c2d518b2), [`d8fa243`](https://github.com/mastra-ai/mastra/commit/d8fa2430d21113e330c4e676ac65e1235cf44f81), [`44fc98b`](https://github.com/mastra-ai/mastra/commit/44fc98b9d1242aa87a3ab44bdce9e9f12c44d8c9), [`f933ba3`](https://github.com/mastra-ai/mastra/commit/f933ba32700e1d0bf143311c1a08f88300b840b6), [`83065bf`](https://github.com/mastra-ai/mastra/commit/83065bfee9e47c3c6f09132a9034501f6cfb69cf), [`0f2ef41`](https://github.com/mastra-ai/mastra/commit/0f2ef4118da022e4f30dac4e9856cc3a8c97671c), [`01b162f`](https://github.com/mastra-ai/mastra/commit/01b162fe435295881aa7ea55f1759407ad5175ad)]:
|
|
57
|
+
- @mastra/core@1.57.0
|
|
58
|
+
- @mastra/observability@1.16.5
|
|
59
|
+
|
|
60
|
+
## 0.1.0-alpha.0
|
|
61
|
+
|
|
62
|
+
### Minor Changes
|
|
63
|
+
|
|
64
|
+
- Added the `@mastra/deepeval` observability exporter to send Mastra traces to Confident AI for evaluation and monitoring. ([#20599](https://github.com/mastra-ai/mastra/pull/20599))
|
|
65
|
+
|
|
66
|
+
Register it in your Mastra observability config:
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
import { Mastra } from '@mastra/core';
|
|
70
|
+
import { Observability } from '@mastra/observability';
|
|
71
|
+
import { DeepEvalExporter } from '@mastra/deepeval';
|
|
72
|
+
|
|
73
|
+
export const mastra = new Mastra({
|
|
74
|
+
observability: new Observability({
|
|
75
|
+
configs: {
|
|
76
|
+
deepeval: {
|
|
77
|
+
serviceName: 'my-service',
|
|
78
|
+
exporters: [new DeepEvalExporter()],
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
}),
|
|
82
|
+
});
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Set `CONFIDENT_API_KEY` (and optionally `CONFIDENT_TRACE_ENVIRONMENT`) to send traces. Mastra spans map to Confident AI's `AGENT`, `LLM`, `TOOL`, `RETRIEVER`, and `CUSTOM` span types, with model, token counts, tool calls, and metric collections carried through.
|
|
86
|
+
|
|
87
|
+
### Patch Changes
|
|
88
|
+
|
|
89
|
+
- Updated dependencies [[`89200ba`](https://github.com/mastra-ai/mastra/commit/89200bafa05444bb7949b363ce7b743e29867561), [`c950138`](https://github.com/mastra-ai/mastra/commit/c950138e72e4f317a40187e3800588731ab790ce), [`063c8b2`](https://github.com/mastra-ai/mastra/commit/063c8b2eb14e4e5ca021779bc33e8c3c031c8604), [`f4e964c`](https://github.com/mastra-ai/mastra/commit/f4e964cad57057301d6bed5c55bcdd730175b941), [`1f7bbd7`](https://github.com/mastra-ai/mastra/commit/1f7bbd7785a8d230aad02454ecabeb4a0b2cc96f), [`e47ff36`](https://github.com/mastra-ai/mastra/commit/e47ff36945720f4ee4caa09f6e83514d7d188608), [`fb9a6ac`](https://github.com/mastra-ai/mastra/commit/fb9a6ac11c9560518742ece60b49d6b062845fd3), [`aa2cec8`](https://github.com/mastra-ai/mastra/commit/aa2cec8501f634d51c2f3ebfb3dd3aa7af8d2ca2), [`2adf8eb`](https://github.com/mastra-ai/mastra/commit/2adf8eb4a70ed2b6cff2dd39281496ea0e025fac), [`8264611`](https://github.com/mastra-ai/mastra/commit/8264611510e421b818bc7395dc2ae4d9c2d518b2), [`44fc98b`](https://github.com/mastra-ai/mastra/commit/44fc98b9d1242aa87a3ab44bdce9e9f12c44d8c9), [`0f2ef41`](https://github.com/mastra-ai/mastra/commit/0f2ef4118da022e4f30dac4e9856cc3a8c97671c)]:
|
|
90
|
+
- @mastra/core@1.57.0-alpha.1
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Portions of this software are licensed as follows:
|
|
2
|
+
|
|
3
|
+
- All content that resides under any directory named "ee/" within this
|
|
4
|
+
repository, including but not limited to:
|
|
5
|
+
- `packages/core/src/auth/ee/`
|
|
6
|
+
- `packages/server/src/server/auth/ee/`
|
|
7
|
+
is licensed under the license defined in `ee/LICENSE`.
|
|
8
|
+
|
|
9
|
+
- All third-party components incorporated into the Mastra Software are
|
|
10
|
+
licensed under the original license provided by the owner of the
|
|
11
|
+
applicable component.
|
|
12
|
+
|
|
13
|
+
- Content outside of the above-mentioned directories or restrictions is
|
|
14
|
+
available under the "Apache License 2.0" as defined below.
|
|
15
|
+
|
|
16
|
+
# Apache License 2.0
|
|
17
|
+
|
|
18
|
+
Copyright (c) 2025 Kepler Software, Inc.
|
|
19
|
+
|
|
20
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
21
|
+
you may not use this file except in compliance with the License.
|
|
22
|
+
You may obtain a copy of the License at
|
|
23
|
+
|
|
24
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
+
|
|
26
|
+
Unless required by applicable law or agreed to in writing, software
|
|
27
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
28
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
29
|
+
See the License for the specific language governing permissions and
|
|
30
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# @mastra/deepeval
|
|
2
|
+
|
|
3
|
+
[Confident AI](https://www.confident-ai.com/) observability exporter for Mastra applications. Sends your Mastra traces to Confident AI for evaluation and monitoring, built on the DeepEval SDK.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @mastra/deepeval
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
### Zero-Config Setup
|
|
14
|
+
|
|
15
|
+
The exporter automatically reads credentials from environment variables:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Required
|
|
19
|
+
CONFIDENT_API_KEY=confident_...
|
|
20
|
+
|
|
21
|
+
# Optional
|
|
22
|
+
CONFIDENT_TRACE_ENVIRONMENT=production # Defaults to "development"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { Observability } from '@mastra/observability';
|
|
27
|
+
import { DeepEvalExporter } from '@mastra/deepeval';
|
|
28
|
+
|
|
29
|
+
const mastra = new Mastra({
|
|
30
|
+
...,
|
|
31
|
+
observability: new Observability({
|
|
32
|
+
configs: {
|
|
33
|
+
deepeval: {
|
|
34
|
+
serviceName: 'my-service',
|
|
35
|
+
exporters: [new DeepEvalExporter()],
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
}),
|
|
39
|
+
});
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Explicit Configuration
|
|
43
|
+
|
|
44
|
+
You can also pass credentials directly:
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
import { Observability } from '@mastra/observability';
|
|
48
|
+
import { DeepEvalExporter } from '@mastra/deepeval';
|
|
49
|
+
|
|
50
|
+
const mastra = new Mastra({
|
|
51
|
+
...,
|
|
52
|
+
observability: new Observability({
|
|
53
|
+
configs: {
|
|
54
|
+
deepeval: {
|
|
55
|
+
serviceName: 'my-service',
|
|
56
|
+
exporters: [
|
|
57
|
+
new DeepEvalExporter({
|
|
58
|
+
apiKey: 'confident_...',
|
|
59
|
+
environment: 'production',
|
|
60
|
+
}),
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
}),
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Configuration Options
|
|
69
|
+
|
|
70
|
+
| Option | Type | Description |
|
|
71
|
+
| ------------------------- | ------------------------ | ----------------------------------------------------------------------------- |
|
|
72
|
+
| `apiKey` | `string` | Confident AI API key. Defaults to the `CONFIDENT_API_KEY` env var |
|
|
73
|
+
| `environment` | `string` | Trace environment. Defaults to `CONFIDENT_TRACE_ENVIRONMENT` or `development` |
|
|
74
|
+
| `name` | `string` | Trace name. Defaults to the Mastra `serviceName` |
|
|
75
|
+
| `tags` | `string[]` | Tags applied to every trace |
|
|
76
|
+
| `metadata` | `Record<string, any>` | Metadata applied to every trace |
|
|
77
|
+
| `metricCollection` | `string` | Trace-level metric collection |
|
|
78
|
+
| `llmMetricCollection` | `string` | Metric collection applied to LLM spans |
|
|
79
|
+
| `agentMetricCollection` | `string` | Metric collection applied to agent spans |
|
|
80
|
+
| `toolMetricCollectionMap` | `Record<string, string>` | Metric collection applied per tool name |
|
|
81
|
+
| `traceCaptureSink` | `(trace) => void` | Receives completed traces locally instead of posting (for offline evaluation) |
|
|
82
|
+
|
|
83
|
+
## Features
|
|
84
|
+
|
|
85
|
+
### Tracing
|
|
86
|
+
|
|
87
|
+
- **Native Confident AI spans**: Mastra spans become `LLM`, `TOOL`, `RETRIEVER`, `AGENT`, and `CUSTOM` spans
|
|
88
|
+
- **Type-specific fields**: Extracts model, token counts, tool calls, and per-type metadata
|
|
89
|
+
- **Error tracking**: Automatic error status and message tracking
|
|
90
|
+
- **Hierarchical traces**: Maintains parent-child relationships and posts the trace once the root span ends
|
|
91
|
+
- **Metric collections**: Attach Confident AI metric collections at the trace and per-span-type level
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var observability = require('@mastra/observability');
|
|
4
|
+
var mastra = require('deepeval/integrations/mastra');
|
|
5
|
+
|
|
6
|
+
// src/tracing.ts
|
|
7
|
+
var DeepEvalExporter = class extends observability.BaseExporter {
|
|
8
|
+
name = "deepeval";
|
|
9
|
+
#inner;
|
|
10
|
+
constructor(config = {}) {
|
|
11
|
+
super(config);
|
|
12
|
+
this.#inner = new mastra.DeepEvalExporter(config);
|
|
13
|
+
}
|
|
14
|
+
init(options) {
|
|
15
|
+
this.#inner.init?.(options);
|
|
16
|
+
}
|
|
17
|
+
async _exportTracingEvent(event) {
|
|
18
|
+
await this.#inner.exportTracingEvent(event);
|
|
19
|
+
}
|
|
20
|
+
async flush() {
|
|
21
|
+
await this.#inner.flush();
|
|
22
|
+
}
|
|
23
|
+
async shutdown() {
|
|
24
|
+
await this.#inner.shutdown();
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.DeepEvalExporter = DeepEvalExporter;
|
|
29
|
+
//# sourceMappingURL=index.cjs.map
|
|
30
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tracing.ts"],"names":["BaseExporter","DeepEvalCoreExporter"],"mappings":";;;;;;AAUO,IAAM,gBAAA,GAAN,cAA+BA,0BAAA,CAAa;AAAA,EACjD,IAAA,GAAO,UAAA;AAAA,EAEE,MAAA;AAAA,EAET,WAAA,CAAY,MAAA,GAAiC,EAAC,EAAG;AAC/C,IAAA,KAAA,CAAM,MAAM,CAAA;AACZ,IAAA,IAAA,CAAK,MAAA,GAAS,IAAIC,uBAAA,CAAqB,MAAM,CAAA;AAAA,EAC/C;AAAA,EAES,KAAK,OAAA,EAAoC;AAChD,IAAA,IAAA,CAAK,MAAA,CAAO,OAAO,OAAO,CAAA;AAAA,EAC5B;AAAA,EAEA,MAAgB,oBAAoB,KAAA,EAAoC;AACtE,IAAA,MAAM,IAAA,CAAK,MAAA,CAAO,kBAAA,CAAmB,KAAK,CAAA;AAAA,EAC5C;AAAA,EAEA,MAAe,KAAA,GAAuB;AACpC,IAAA,MAAM,IAAA,CAAK,OAAO,KAAA,EAAM;AAAA,EAC1B;AAAA,EAEA,MAAe,QAAA,GAA0B;AACvC,IAAA,MAAM,IAAA,CAAK,OAAO,QAAA,EAAS;AAAA,EAC7B;AACF","file":"index.cjs","sourcesContent":["import type { InitExporterOptions, TracingEvent } from '@mastra/core/observability';\nimport { BaseExporter } from '@mastra/observability';\nimport type { BaseExporterConfig } from '@mastra/observability';\nimport {\n DeepEvalExporter as DeepEvalCoreExporter,\n type DeepEvalExporterConfig as DeepEvalCoreConfig,\n} from 'deepeval/integrations/mastra';\n\nexport interface DeepEvalExporterConfig extends BaseExporterConfig, DeepEvalCoreConfig {}\n\nexport class DeepEvalExporter extends BaseExporter {\n name = 'deepeval';\n\n readonly #inner: DeepEvalCoreExporter;\n\n constructor(config: DeepEvalExporterConfig = {}) {\n super(config);\n this.#inner = new DeepEvalCoreExporter(config);\n }\n\n override init(options: InitExporterOptions): void {\n this.#inner.init?.(options);\n }\n\n protected async _exportTracingEvent(event: TracingEvent): Promise<void> {\n await this.#inner.exportTracingEvent(event);\n }\n\n override async flush(): Promise<void> {\n await this.#inner.flush();\n }\n\n override async shutdown(): Promise<void> {\n await this.#inner.shutdown();\n }\n}\n"]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BaseExporter } from '@mastra/observability';
|
|
2
|
+
import { DeepEvalExporter as DeepEvalExporter$1 } from 'deepeval/integrations/mastra';
|
|
3
|
+
|
|
4
|
+
// src/tracing.ts
|
|
5
|
+
var DeepEvalExporter = class extends BaseExporter {
|
|
6
|
+
name = "deepeval";
|
|
7
|
+
#inner;
|
|
8
|
+
constructor(config = {}) {
|
|
9
|
+
super(config);
|
|
10
|
+
this.#inner = new DeepEvalExporter$1(config);
|
|
11
|
+
}
|
|
12
|
+
init(options) {
|
|
13
|
+
this.#inner.init?.(options);
|
|
14
|
+
}
|
|
15
|
+
async _exportTracingEvent(event) {
|
|
16
|
+
await this.#inner.exportTracingEvent(event);
|
|
17
|
+
}
|
|
18
|
+
async flush() {
|
|
19
|
+
await this.#inner.flush();
|
|
20
|
+
}
|
|
21
|
+
async shutdown() {
|
|
22
|
+
await this.#inner.shutdown();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export { DeepEvalExporter };
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tracing.ts"],"names":["DeepEvalCoreExporter"],"mappings":";;;;AAUO,IAAM,gBAAA,GAAN,cAA+B,YAAA,CAAa;AAAA,EACjD,IAAA,GAAO,UAAA;AAAA,EAEE,MAAA;AAAA,EAET,WAAA,CAAY,MAAA,GAAiC,EAAC,EAAG;AAC/C,IAAA,KAAA,CAAM,MAAM,CAAA;AACZ,IAAA,IAAA,CAAK,MAAA,GAAS,IAAIA,kBAAA,CAAqB,MAAM,CAAA;AAAA,EAC/C;AAAA,EAES,KAAK,OAAA,EAAoC;AAChD,IAAA,IAAA,CAAK,MAAA,CAAO,OAAO,OAAO,CAAA;AAAA,EAC5B;AAAA,EAEA,MAAgB,oBAAoB,KAAA,EAAoC;AACtE,IAAA,MAAM,IAAA,CAAK,MAAA,CAAO,kBAAA,CAAmB,KAAK,CAAA;AAAA,EAC5C;AAAA,EAEA,MAAe,KAAA,GAAuB;AACpC,IAAA,MAAM,IAAA,CAAK,OAAO,KAAA,EAAM;AAAA,EAC1B;AAAA,EAEA,MAAe,QAAA,GAA0B;AACvC,IAAA,MAAM,IAAA,CAAK,OAAO,QAAA,EAAS;AAAA,EAC7B;AACF","file":"index.js","sourcesContent":["import type { InitExporterOptions, TracingEvent } from '@mastra/core/observability';\nimport { BaseExporter } from '@mastra/observability';\nimport type { BaseExporterConfig } from '@mastra/observability';\nimport {\n DeepEvalExporter as DeepEvalCoreExporter,\n type DeepEvalExporterConfig as DeepEvalCoreConfig,\n} from 'deepeval/integrations/mastra';\n\nexport interface DeepEvalExporterConfig extends BaseExporterConfig, DeepEvalCoreConfig {}\n\nexport class DeepEvalExporter extends BaseExporter {\n name = 'deepeval';\n\n readonly #inner: DeepEvalCoreExporter;\n\n constructor(config: DeepEvalExporterConfig = {}) {\n super(config);\n this.#inner = new DeepEvalCoreExporter(config);\n }\n\n override init(options: InitExporterOptions): void {\n this.#inner.init?.(options);\n }\n\n protected async _exportTracingEvent(event: TracingEvent): Promise<void> {\n await this.#inner.exportTracingEvent(event);\n }\n\n override async flush(): Promise<void> {\n await this.#inner.flush();\n }\n\n override async shutdown(): Promise<void> {\n await this.#inner.shutdown();\n }\n}\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { InitExporterOptions, TracingEvent } from '@mastra/core/observability';
|
|
2
|
+
import { BaseExporter } from '@mastra/observability';
|
|
3
|
+
import type { BaseExporterConfig } from '@mastra/observability';
|
|
4
|
+
import { type DeepEvalExporterConfig as DeepEvalCoreConfig } from 'deepeval/integrations/mastra';
|
|
5
|
+
export interface DeepEvalExporterConfig extends BaseExporterConfig, DeepEvalCoreConfig {
|
|
6
|
+
}
|
|
7
|
+
export declare class DeepEvalExporter extends BaseExporter {
|
|
8
|
+
#private;
|
|
9
|
+
name: string;
|
|
10
|
+
constructor(config?: DeepEvalExporterConfig);
|
|
11
|
+
init(options: InitExporterOptions): void;
|
|
12
|
+
protected _exportTracingEvent(event: TracingEvent): Promise<void>;
|
|
13
|
+
flush(): Promise<void>;
|
|
14
|
+
shutdown(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=tracing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../src/tracing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAEL,KAAK,sBAAsB,IAAI,kBAAkB,EAClD,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB,EAAE,kBAAkB;CAAG;AAEzF,qBAAa,gBAAiB,SAAQ,YAAY;;IAChD,IAAI,SAAc;gBAIN,MAAM,GAAE,sBAA2B;IAKtC,IAAI,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI;cAIjC,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAIxD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAGzC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mastra/deepeval",
|
|
3
|
+
"version": "0.0.0-esbuild-bundle-worker-20260807173433",
|
|
4
|
+
"description": "DeepEval (Confident AI) observability provider for Mastra - includes tracing and future observability features",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"CHANGELOG.md"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"require": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"default": "./dist/index.cjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"./package.json": "./package.json"
|
|
24
|
+
},
|
|
25
|
+
"license": "Apache-2.0",
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"deepeval": "^0.1.32",
|
|
28
|
+
"@mastra/observability": "0.0.0-esbuild-bundle-worker-20260807173433"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@types/node": "22.20.1",
|
|
32
|
+
"@vitest/coverage-v8": "4.1.10",
|
|
33
|
+
"@vitest/ui": "4.1.10",
|
|
34
|
+
"eslint": "^10.4.1",
|
|
35
|
+
"tsup": "^8.5.1",
|
|
36
|
+
"typescript": "^6.0.3",
|
|
37
|
+
"vitest": "4.1.10",
|
|
38
|
+
"@internal/lint": "0.0.0-esbuild-bundle-worker-20260807173433",
|
|
39
|
+
"@internal/types-builder": "0.0.0-esbuild-bundle-worker-20260807173433",
|
|
40
|
+
"@mastra/core": "0.0.0-esbuild-bundle-worker-20260807173433"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"@mastra/core": "0.0.0-esbuild-bundle-worker-20260807173433"
|
|
44
|
+
},
|
|
45
|
+
"homepage": "https://mastra.ai",
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/mastra-ai/mastra.git",
|
|
49
|
+
"directory": "observability/deepeval"
|
|
50
|
+
},
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/mastra-ai/mastra/issues"
|
|
53
|
+
},
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=22.13.0"
|
|
56
|
+
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsup --silent --config tsup.config.ts",
|
|
59
|
+
"build:watch": "pnpm build --watch",
|
|
60
|
+
"test": "vitest run",
|
|
61
|
+
"test:watch": "vitest watch",
|
|
62
|
+
"lint": "eslint ."
|
|
63
|
+
}
|
|
64
|
+
}
|