@mastra/observability 1.6.0-alpha.0 → 1.6.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/dist/index.cjs +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/spans/default.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @mastra/observability
|
|
2
2
|
|
|
3
|
+
## 1.6.0-alpha.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Fixed MODEL_GENERATION and AGENT_RUN spans not reflecting model, provider, parameters, and availableTools overrides from input processors. Traces in Langfuse and other exporters now show the correct model info when a processor dynamically switches models. ([#14705](https://github.com/mastra-ai/mastra/pull/14705))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`e333b77`](https://github.com/mastra-ai/mastra/commit/e333b77e2d76ba57ccec1818e08cebc1993469ff), [`60a224d`](https://github.com/mastra-ai/mastra/commit/60a224dd497240e83698cfa5bfd02e3d1d854844), [`949b7bf`](https://github.com/mastra-ai/mastra/commit/949b7bfd4e40f2b2cba7fef5eb3f108a02cfe938), [`d084b66`](https://github.com/mastra-ai/mastra/commit/d084b6692396057e83c086b954c1857d20b58a14), [`79c699a`](https://github.com/mastra-ai/mastra/commit/79c699acf3cd8a77e11c55530431f48eb48456e9), [`62757b6`](https://github.com/mastra-ai/mastra/commit/62757b6db6e8bb86569d23ad0b514178f57053f8), [`3d70b0b`](https://github.com/mastra-ai/mastra/commit/3d70b0b3524d817173ad870768f259c06d61bd23), [`3b45a13`](https://github.com/mastra-ai/mastra/commit/3b45a138d09d040779c0aba1edbbfc1b57442d23), [`8127d96`](https://github.com/mastra-ai/mastra/commit/8127d96280492e335d49b244501088dfdd59a8f1)]:
|
|
10
|
+
- @mastra/core@1.18.0-alpha.3
|
|
11
|
+
|
|
12
|
+
## 1.6.0-alpha.1
|
|
13
|
+
|
|
14
|
+
### Minor Changes
|
|
15
|
+
|
|
16
|
+
- Added cost estimation for observability metrics. ([#14609](https://github.com/mastra-ai/mastra/pull/14609))
|
|
17
|
+
- Added embedded pricing data and runtime cost estimation for auto-extracted model token metrics.
|
|
18
|
+
- Added cost context propagation through observability metrics and exporters.
|
|
19
|
+
|
|
20
|
+
**Breaking / Upgrade Notes**
|
|
21
|
+
- This version adds metric cost estimation and requires the newer observability fields and hooks provided by `@mastra/core >=1.17.0-0`.
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Fixed cost estimation matching for AI SDK providers by normalizing provider names (e.g. 'openai.chat' → 'openai') to match pricing data keys. ([#14716](https://github.com/mastra-ai/mastra/pull/14716))
|
|
26
|
+
|
|
27
|
+
- Improved model usage normalization and total cost reporting. Model generation spans now populate input and output text detail buckets from the reported totals when providers do not supply a full breakdown, and `mastra_model_total_input_tokens` / `mastra_model_total_output_tokens` now include estimated cost based on the successfully priced detail buckets for those totals. ([#14674](https://github.com/mastra-ai/mastra/pull/14674))
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [[`dc514a8`](https://github.com/mastra-ai/mastra/commit/dc514a83dba5f719172dddfd2c7b858e4943d067), [`404fea1`](https://github.com/mastra-ai/mastra/commit/404fea13042181f0b0c73a101392ac87c79ceae2), [`ebf5047`](https://github.com/mastra-ai/mastra/commit/ebf5047e825c38a1a356f10b214c1d4260dfcd8d), [`675f15b`](https://github.com/mastra-ai/mastra/commit/675f15b7eaeea649158d228ea635be40480c584d), [`b174c63`](https://github.com/mastra-ai/mastra/commit/b174c63a093108d4e53b9bc89a078d9f66202b3f), [`eef7cb2`](https://github.com/mastra-ai/mastra/commit/eef7cb2abe7ef15951e2fdf792a5095c6c643333), [`e8a5b0b`](https://github.com/mastra-ai/mastra/commit/e8a5b0b9bc94d12dee4150095512ca27a288d778)]:
|
|
30
|
+
- @mastra/core@1.18.0-alpha.0
|
|
31
|
+
|
|
3
32
|
## 1.6.0-alpha.0
|
|
4
33
|
|
|
5
34
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -17503,11 +17503,16 @@ function getPackageRoot() {
|
|
|
17503
17503
|
}
|
|
17504
17504
|
}
|
|
17505
17505
|
function makePricingKey(args) {
|
|
17506
|
-
return `${
|
|
17506
|
+
return `${normalizeProvider(args.provider)}::${normalizeKeyPart(args.model)}`;
|
|
17507
17507
|
}
|
|
17508
17508
|
function normalizeKeyPart(value) {
|
|
17509
17509
|
return value.trim().toLowerCase();
|
|
17510
17510
|
}
|
|
17511
|
+
function normalizeProvider(provider) {
|
|
17512
|
+
const normalized = provider.trim().toLowerCase();
|
|
17513
|
+
const dotIndex = normalized.indexOf(".");
|
|
17514
|
+
return dotIndex !== -1 ? normalized.substring(0, dotIndex) : normalized;
|
|
17515
|
+
}
|
|
17511
17516
|
|
|
17512
17517
|
// src/metrics/types.ts
|
|
17513
17518
|
var PricingMeter = {
|
|
@@ -18898,6 +18903,9 @@ var DefaultSpan = class extends BaseSpan {
|
|
|
18898
18903
|
if (this.isEvent) {
|
|
18899
18904
|
return;
|
|
18900
18905
|
}
|
|
18906
|
+
if (options.name !== void 0) {
|
|
18907
|
+
this.name = options.name;
|
|
18908
|
+
}
|
|
18901
18909
|
if (options.input !== void 0) {
|
|
18902
18910
|
this.input = deepClean(options.input, this.deepCleanOptions);
|
|
18903
18911
|
}
|