@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/dist/index.js CHANGED
@@ -17495,11 +17495,16 @@ function getPackageRoot() {
17495
17495
  }
17496
17496
  }
17497
17497
  function makePricingKey(args) {
17498
- return `${normalizeKeyPart(args.provider)}::${normalizeKeyPart(args.model)}`;
17498
+ return `${normalizeProvider(args.provider)}::${normalizeKeyPart(args.model)}`;
17499
17499
  }
17500
17500
  function normalizeKeyPart(value) {
17501
17501
  return value.trim().toLowerCase();
17502
17502
  }
17503
+ function normalizeProvider(provider) {
17504
+ const normalized = provider.trim().toLowerCase();
17505
+ const dotIndex = normalized.indexOf(".");
17506
+ return dotIndex !== -1 ? normalized.substring(0, dotIndex) : normalized;
17507
+ }
17503
17508
 
17504
17509
  // src/metrics/types.ts
17505
17510
  var PricingMeter = {
@@ -18890,6 +18895,9 @@ var DefaultSpan = class extends BaseSpan {
18890
18895
  if (this.isEvent) {
18891
18896
  return;
18892
18897
  }
18898
+ if (options.name !== void 0) {
18899
+ this.name = options.name;
18900
+ }
18893
18901
  if (options.input !== void 0) {
18894
18902
  this.input = deepClean(options.input, this.deepCleanOptions);
18895
18903
  }