@mastra/observability 1.9.1 → 1.9.2-alpha.0

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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # @mastra/observability
2
2
 
3
+ ## 1.9.2-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed span serialization replacing tool parameter JSON schemas with lossy summaries like `"unknown (required)"`. JSON schemas in span data are now preserved as-is, keeping full type information for debugging in observability tools like Datadog. Also fixed MODEL_STEP span input showing only a keys summary instead of actual messages for AI SDK v5 providers. ([#15404](https://github.com/mastra-ai/mastra/pull/15404))
8
+
9
+ - Fixed CloudExporter to default to observability.mastra.ai for Mastra platform exports. ([#15418](https://github.com/mastra-ai/mastra/pull/15418))
10
+
11
+ - Updated dependencies [[`3d83d06`](https://github.com/mastra-ai/mastra/commit/3d83d06f776f00fb5f4163dddd32a030c5c20844), [`7e0e63e`](https://github.com/mastra-ai/mastra/commit/7e0e63e2e485e84442351f4c7a79a424c83539dc), [`9467ea8`](https://github.com/mastra-ai/mastra/commit/9467ea87695749a53dfc041576410ebf9ee7bb67), [`7338d94`](https://github.com/mastra-ai/mastra/commit/7338d949380cf68b095342e8e42610dc51d557c1)]:
12
+ - @mastra/core@1.26.0-alpha.2
13
+
3
14
  ## 1.9.1
4
15
 
5
16
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"cloud.d.ts","sourceRoot":"","sources":["../../src/exporters/cloud.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,YAAY,EAEZ,QAAQ,EACR,WAAW,EACX,UAAU,EACV,aAAa,EACd,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,WAAW,mBAAoB,SAAQ,kBAAkB;IAC7D,YAAY,CAAC,EAAE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B,mBAAmB,CAAC,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAWjE,UAAU,CAAC,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAS1C,aAAa,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAShD,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IAS9C,eAAe,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAS1D,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,iBAAiB;IAOzB,OAAO,CAAC,gBAAgB;IAOxB,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,eAAe;IAMvB,OAAO,CAAC,UAAU;IAelB,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,cAAc;YAMR,mBAAmB;IAYjC,OAAO,CAAC,WAAW;IAiBnB,OAAO,CAAC,aAAa;YAoBP,WAAW;IAoDzB;;OAEG;YACW,WAAW;YAuBX,gBAAgB;IA+B9B,OAAO,CAAC,WAAW;IAUnB;;;;OAIG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA4BtB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAiChC"}
package/dist/index.cjs CHANGED
@@ -15058,7 +15058,6 @@ var SIGNAL_PUBLISH_SEGMENTS = {
15058
15058
  scores: "scores",
15059
15059
  feedback: "feedback"
15060
15060
  };
15061
- var DEFAULT_CLOUD_ENDPOINT = "https://api.mastra.ai";
15062
15061
  function trimTrailingSlashes(value) {
15063
15062
  let end = value.length;
15064
15063
  while (end > 0 && value.charCodeAt(end - 1) === 47) {
@@ -15187,7 +15186,7 @@ var CloudExporter = class extends BaseExporter {
15187
15186
  if (tracesEndpointOverride) {
15188
15187
  tracesEndpoint = resolveExplicitSignalEndpoint("traces", tracesEndpointOverride, projectId);
15189
15188
  } else {
15190
- baseEndpoint = resolveBaseEndpoint(config2.endpoint ?? DEFAULT_CLOUD_ENDPOINT);
15189
+ baseEndpoint = resolveBaseEndpoint(config2.endpoint ?? "https://observability.mastra.ai");
15191
15190
  tracesEndpoint = buildSignalEndpoint(baseEndpoint, "traces", projectId);
15192
15191
  }
15193
15192
  const resolveConfiguredSignalEndpoint = (signal, explicitEndpoint) => {
@@ -17436,51 +17435,6 @@ function isJsonSchema(val) {
17436
17435
  }
17437
17436
  return false;
17438
17437
  }
17439
- function compressJsonSchema(schema, depth = 0) {
17440
- if (depth > 3) {
17441
- return schema.type || "object";
17442
- }
17443
- const compositionKeys = ["oneOf", "anyOf", "allOf"].filter((key) => Array.isArray(schema[key]));
17444
- if (compositionKeys.length > 0) {
17445
- const compressed2 = {};
17446
- for (const key of compositionKeys) {
17447
- compressed2[key] = schema[key].map((entry) => compressJsonSchema(entry, depth + 1));
17448
- }
17449
- if (typeof schema.type === "string") {
17450
- compressed2.type = schema.type;
17451
- }
17452
- return compressed2;
17453
- }
17454
- if (schema.type !== "object" || !schema.properties) {
17455
- return schema.type || schema;
17456
- }
17457
- const required2 = new Set(Array.isArray(schema.required) ? schema.required : []);
17458
- const compressed = {};
17459
- for (const [key, propSchema] of Object.entries(schema.properties)) {
17460
- const prop = propSchema;
17461
- let value = prop.type || "unknown";
17462
- if (prop.type === "object" && prop.properties) {
17463
- value = compressJsonSchema(prop, depth + 1);
17464
- if (required2.has(key)) {
17465
- compressed[key + " (required)"] = value;
17466
- continue;
17467
- }
17468
- } else if (prop.type === "array" && prop.items) {
17469
- if (prop.items.type === "object" && prop.items.properties) {
17470
- value = [compressJsonSchema(prop.items, depth + 1)];
17471
- } else {
17472
- value = `${prop.items.type || "any"}[]`;
17473
- }
17474
- } else if (prop.enum) {
17475
- value = prop.enum.map((v) => JSON.stringify(v)).join(" | ");
17476
- }
17477
- if (required2.has(key) && typeof value === "string") {
17478
- value += " (required)";
17479
- }
17480
- compressed[key] = value;
17481
- }
17482
- return compressed;
17483
- }
17484
17438
  function deepClean(value, options = DEFAULT_DEEP_CLEAN_OPTIONS) {
17485
17439
  const { keysToStrip, maxDepth, maxStringLength, maxArrayLength, maxObjectKeys } = options;
17486
17440
  const stripSet = keysToStrip instanceof Set ? keysToStrip : new Set(Array.isArray(keysToStrip) ? keysToStrip : Object.keys(keysToStrip));
@@ -17660,11 +17614,7 @@ function deepClean(value, options = DEFAULT_DEEP_CLEAN_OPTIONS) {
17660
17614
  looksLikeJsonSchema = false;
17661
17615
  }
17662
17616
  if (looksLikeJsonSchema) {
17663
- try {
17664
- const compressed = compressJsonSchema(val);
17665
- return compressed === val ? "[JSONSchema]" : helper(compressed, depth);
17666
- } catch {
17667
- }
17617
+ return val;
17668
17618
  }
17669
17619
  const cleaned = {};
17670
17620
  const keys = Object.keys(val).filter((key) => !stripSet.has(key));
@@ -18767,6 +18717,9 @@ function summarizeRequestBody(body) {
18767
18717
  if (Array.isArray(body.messages)) {
18768
18718
  return normalizeMessages(body.messages);
18769
18719
  }
18720
+ if (Array.isArray(body.input)) {
18721
+ return normalizeMessages(body.input);
18722
+ }
18770
18723
  if (Array.isArray(body.contents)) {
18771
18724
  return body.contents.map((item) => ({
18772
18725
  role: typeof item?.role === "string" ? item.role : "user",