@mastra/observability 1.23.0-alpha.0 → 1.23.0-alpha.1

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
@@ -3340,6 +3340,13 @@ function definedLineage(source) {
3340
3340
  }
3341
3341
  return lineage;
3342
3342
  }
3343
+ function modelPair(attributes) {
3344
+ const { model, provider } = attributes ?? {};
3345
+ return typeof model === "string" && model && typeof provider === "string" && provider ? {
3346
+ model,
3347
+ provider
3348
+ } : {};
3349
+ }
3343
3350
  /**
3344
3351
  * Determines if a span type should be considered internal based on flags.
3345
3352
  * Returns false if flags are undefined.
@@ -3834,6 +3841,7 @@ var BaseSpan = class BaseSpan {
3834
3841
  parentSpanId: this.getParentSpanId(includeInternalSpans),
3835
3842
  externalParentSpanId: this.getExportedExternalParentSpanId(includeInternalSpans),
3836
3843
  ...this.resumedFromSpanId !== void 0 ? { resumedFromSpanId: this.resumedFromSpanId } : {},
3844
+ ...modelPair(this.attributes),
3837
3845
  ...typeof timeToFirstTokenMs === "number" ? { timeToFirstTokenMs } : {},
3838
3846
  ...nestedUnderParent ? { nestedUnderParent: true } : {},
3839
3847
  ...links ? { links } : {},
@@ -3843,7 +3851,7 @@ var BaseSpan = class BaseSpan {
3843
3851
  /** Returns the span saved for a later `rebuildSpan()`, with its trace state */
3844
3852
  snapshot() {
3845
3853
  return {
3846
- ...this.exportSpan(),
3854
+ ...this.exportSpan(this.observabilityInstance.getConfig().includeInternalSpans),
3847
3855
  ownEntityVersionId: this.ownEntityVersionId ?? null,
3848
3856
  ...this.traceState ? { traceState: this.traceState } : {}
3849
3857
  };