@mastra/observability 1.10.0-alpha.2 → 1.10.0-alpha.3

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
@@ -1,7 +1,7 @@
1
1
  import { MastraBase } from '@mastra/core/base';
2
2
  import { MastraError, ErrorCategory, ErrorDomain } from '@mastra/core/error';
3
3
  import { ConsoleLogger, LogLevel, RegisteredLogger } from '@mastra/core/logger';
4
- import { SpanType, TracingEventType, DEFAULT_BLOCKED_LABELS, noOpLoggerContext, InternalSpans } from '@mastra/core/observability';
4
+ import { SpanType, TracingEventType, generateSignalId, DEFAULT_BLOCKED_LABELS, noOpLoggerContext, InternalSpans } from '@mastra/core/observability';
5
5
  import { fetchWithRetry, getNestedValue, setNestedValue } from '@mastra/core/utils';
6
6
  import { buildUpdateSpanRecord, buildFeedbackRecord, buildLogRecord, buildMetricRecord, buildScoreRecord, buildCreateSpanRecord } from '@mastra/core/storage';
7
7
  import fs from 'fs';
@@ -17794,8 +17794,6 @@ var ObservabilityBus = class extends BaseObservabilityEventBus {
17794
17794
  await super.shutdown();
17795
17795
  }
17796
17796
  };
17797
-
17798
- // src/context/logger.ts
17799
17797
  var LOG_LEVEL_PRIORITY = {
17800
17798
  debug: 0,
17801
17799
  info: 1,
@@ -17848,6 +17846,7 @@ var LoggerContextImpl = class {
17848
17846
  return;
17849
17847
  }
17850
17848
  const exportedLog = {
17849
+ logId: generateSignalId(),
17851
17850
  timestamp: /* @__PURE__ */ new Date(),
17852
17851
  level,
17853
17852
  message,
@@ -17861,8 +17860,6 @@ var LoggerContextImpl = class {
17861
17860
  this.config.observabilityBus.emit(event);
17862
17861
  }
17863
17862
  };
17864
-
17865
- // src/context/metrics.ts
17866
17863
  var MetricsContextImpl = class {
17867
17864
  traceId;
17868
17865
  spanId;
@@ -17890,6 +17887,7 @@ var MetricsContextImpl = class {
17890
17887
  const filteredLabels = labels ? this.cardinalityFilter.filterLabels(labels) : {};
17891
17888
  const costContext = options?.costContext ? cloneCostContext(options.costContext) : void 0;
17892
17889
  const exportedMetric = {
17890
+ metricId: generateSignalId(),
17893
17891
  timestamp: /* @__PURE__ */ new Date(),
17894
17892
  traceId: this.traceId,
17895
17893
  spanId: this.spanId,
@@ -20194,8 +20192,6 @@ var DefaultObservabilityInstance = class extends BaseObservabilityInstance {
20194
20192
  return new DefaultSpan(options, this);
20195
20193
  }
20196
20194
  };
20197
-
20198
- // src/recorded.ts
20199
20195
  function nullToUndefined(value) {
20200
20196
  return value ?? void 0;
20201
20197
  }
@@ -20250,6 +20246,7 @@ function buildScoreEvent(args) {
20250
20246
  return {
20251
20247
  type: "score",
20252
20248
  score: {
20249
+ scoreId: generateSignalId(),
20253
20250
  timestamp: /* @__PURE__ */ new Date(),
20254
20251
  traceId,
20255
20252
  spanId,
@@ -20271,6 +20268,7 @@ function buildFeedbackEvent(args) {
20271
20268
  return {
20272
20269
  type: "feedback",
20273
20270
  feedback: {
20271
+ feedbackId: generateSignalId(),
20274
20272
  timestamp: /* @__PURE__ */ new Date(),
20275
20273
  traceId,
20276
20274
  spanId,