@mastra/observability 1.24.0-alpha.5 → 1.24.0-alpha.6
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/bus/observability-bus.d.ts.map +1 -1
- package/dist/bus/route-event.d.ts.map +1 -1
- package/dist/default.d.ts +3 -2
- package/dist/default.d.ts.map +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +63 -53
- package/dist/docs/references/reference-observability-feedback.md +14 -0
- package/dist/docs/references/reference-observability-tracing-exporters-langfuse.md +24 -1
- package/dist/exporters/default.d.ts +3 -1
- package/dist/exporters/default.d.ts.map +1 -1
- package/dist/exporters/event-buffer.d.ts +1 -1
- package/dist/exporters/event-buffer.d.ts.map +1 -1
- package/dist/exporters/keyed-queue.d.ts +6 -0
- package/dist/exporters/keyed-queue.d.ts.map +1 -0
- package/dist/exporters/mastra-platform.d.ts +4 -1
- package/dist/exporters/mastra-platform.d.ts.map +1 -1
- package/dist/exporters/mastra-storage.d.ts +3 -1
- package/dist/exporters/mastra-storage.d.ts.map +1 -1
- package/dist/exporters/platform-resolved-record.d.ts +1 -1
- package/dist/exporters/platform-resolved-record.d.ts.map +1 -1
- package/dist/exporters/storage-annotation.d.ts +4 -1
- package/dist/exporters/storage-annotation.d.ts.map +1 -1
- package/dist/index.cjs +122 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +121 -7
- package/dist/index.js.map +1 -1
- package/dist/spans/base.d.ts +9 -0
- package/dist/spans/base.d.ts.map +1 -1
- package/dist/spans/default.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -52,6 +52,9 @@ function routeToHandler(handler, event, logger) {
|
|
|
52
52
|
}), handler.name, "score", logger);
|
|
53
53
|
}
|
|
54
54
|
break;
|
|
55
|
+
case "feedback_review_status":
|
|
56
|
+
if (handler.onFeedbackReviewStatusEvent) return catchAsyncResult(handler.onFeedbackReviewStatusEvent(event), handler.name, "feedback review status", logger);
|
|
57
|
+
break;
|
|
55
58
|
case "feedback_replacement":
|
|
56
59
|
if (handler.onFeedbackReplacementEvent) return catchAsyncResult(handler.onFeedbackReplacementEvent(event), handler.name, "feedback replacement", logger);
|
|
57
60
|
break;
|
|
@@ -555,6 +558,10 @@ function cleanEvent(event, options) {
|
|
|
555
558
|
type: "score",
|
|
556
559
|
score: deepClean(event.score, options)
|
|
557
560
|
};
|
|
561
|
+
case "feedback_review_status": return {
|
|
562
|
+
type: event.type,
|
|
563
|
+
feedback: deepClean(event.feedback, options)
|
|
564
|
+
};
|
|
558
565
|
case "feedback_replacement": return {
|
|
559
566
|
type: event.type,
|
|
560
567
|
feedback: deepClean(event.feedback, options)
|
|
@@ -3426,6 +3433,34 @@ function mergeMetadata$1(parentMetadata, metadata) {
|
|
|
3426
3433
|
}
|
|
3427
3434
|
}
|
|
3428
3435
|
// src/spans/base.ts
|
|
3436
|
+
/** Replaces error text exported from traces that hide input or output. */
|
|
3437
|
+
const REDACTED_ERROR_MESSAGE = "[REDACTED]";
|
|
3438
|
+
/**
|
|
3439
|
+
* The error as exported from a trace that hides input or output: keeps what
|
|
3440
|
+
* identifies the error (id, name, domain, category, stack frames) and drops
|
|
3441
|
+
* text and free-form details, which can quote the hidden data.
|
|
3442
|
+
*/
|
|
3443
|
+
function redactErrorInfo(errorInfo, stackMessage) {
|
|
3444
|
+
if (!errorInfo) return errorInfo;
|
|
3445
|
+
const { id, name, domain, category, stack } = errorInfo;
|
|
3446
|
+
return {
|
|
3447
|
+
...id !== void 0 ? { id } : {},
|
|
3448
|
+
...name !== void 0 ? { name } : {},
|
|
3449
|
+
...domain !== void 0 ? { domain } : {},
|
|
3450
|
+
...category !== void 0 ? { category } : {},
|
|
3451
|
+
message: REDACTED_ERROR_MESSAGE,
|
|
3452
|
+
...stack !== void 0 ? { stack: redactStackHeader(stack, stackMessage ?? errorInfo.message, errorInfo.name) } : {}
|
|
3453
|
+
};
|
|
3454
|
+
}
|
|
3455
|
+
/** Preserve stack frames only when they follow the complete captured message. */
|
|
3456
|
+
function redactStackHeader(stack, message, name = "Error") {
|
|
3457
|
+
const redactedHeader = `${name}: ${REDACTED_ERROR_MESSAGE}`;
|
|
3458
|
+
const separator = `: ${message}`;
|
|
3459
|
+
const separatorIndex = stack.indexOf(separator);
|
|
3460
|
+
if (separatorIndex <= 0 || stack.slice(0, separatorIndex).includes("\n")) return redactedHeader;
|
|
3461
|
+
const suffix = stack.slice(separatorIndex + separator.length);
|
|
3462
|
+
return suffix === "" || suffix.startsWith("\n") ? `${redactedHeader}${suffix}` : redactedHeader;
|
|
3463
|
+
}
|
|
3429
3464
|
const LINEAGE_KEYS = [
|
|
3430
3465
|
"parentEntityType",
|
|
3431
3466
|
"parentEntityId",
|
|
@@ -3555,6 +3590,7 @@ var BaseSpan = class BaseSpan {
|
|
|
3555
3590
|
stopReason;
|
|
3556
3591
|
stopReasonContext;
|
|
3557
3592
|
errorInfo;
|
|
3593
|
+
errorStackMessage;
|
|
3558
3594
|
metadata;
|
|
3559
3595
|
requestContext;
|
|
3560
3596
|
tags;
|
|
@@ -3942,7 +3978,7 @@ var BaseSpan = class BaseSpan {
|
|
|
3942
3978
|
endTime: this.endTime,
|
|
3943
3979
|
input: hideInput ? void 0 : this.input,
|
|
3944
3980
|
output: hideOutput ? void 0 : this.output,
|
|
3945
|
-
errorInfo: this.errorInfo,
|
|
3981
|
+
errorInfo: hideInput || hideOutput ? redactErrorInfo(this.errorInfo, this.errorStackMessage) : this.errorInfo,
|
|
3946
3982
|
...this.outcome !== void 0 ? { outcome: this.outcome } : {},
|
|
3947
3983
|
...this.stopReason !== void 0 ? { stopReason: this.stopReason } : {},
|
|
3948
3984
|
...this.stopReasonContext !== void 0 ? { stopReasonContext: this.stopReasonContext } : {},
|
|
@@ -4094,6 +4130,8 @@ var DefaultSpan = class extends BaseSpan {
|
|
|
4094
4130
|
};
|
|
4095
4131
|
if (!this.isExcluded) {
|
|
4096
4132
|
const apiDetails = apiCallErrorDetails(error);
|
|
4133
|
+
const stackError = error instanceof MastraError && error.cause instanceof Error && error.cause.stack ? error.cause : error;
|
|
4134
|
+
this.errorStackMessage = stackError.message;
|
|
4097
4135
|
this.errorInfo = deepClean(error instanceof MastraError ? {
|
|
4098
4136
|
id: error.id,
|
|
4099
4137
|
details: apiDetails ? {
|
|
@@ -4104,7 +4142,7 @@ var DefaultSpan = class extends BaseSpan {
|
|
|
4104
4142
|
domain: error.domain,
|
|
4105
4143
|
message: error.message,
|
|
4106
4144
|
name: error.name,
|
|
4107
|
-
stack:
|
|
4145
|
+
stack: stackError.stack
|
|
4108
4146
|
} : {
|
|
4109
4147
|
message: error.message,
|
|
4110
4148
|
name: error.name,
|
|
@@ -4606,6 +4644,20 @@ var EventBuffer = class {
|
|
|
4606
4644
|
});
|
|
4607
4645
|
}
|
|
4608
4646
|
};
|
|
4647
|
+
// src/exporters/keyed-queue.ts
|
|
4648
|
+
/** Keep writes to one record ordered without blocking unrelated records. */
|
|
4649
|
+
var KeyedQueue = class {
|
|
4650
|
+
pending = /* @__PURE__ */ new Map();
|
|
4651
|
+
enqueue(key, write) {
|
|
4652
|
+
const current = (this.pending.get(key) ?? Promise.resolve()).catch(() => {}).then(write);
|
|
4653
|
+
this.pending.set(key, current);
|
|
4654
|
+
const cleanup = () => {
|
|
4655
|
+
if (this.pending.get(key) === current) this.pending.delete(key);
|
|
4656
|
+
};
|
|
4657
|
+
current.then(cleanup, cleanup);
|
|
4658
|
+
return current;
|
|
4659
|
+
}
|
|
4660
|
+
};
|
|
4609
4661
|
// src/recorded.ts
|
|
4610
4662
|
function nullToUndefined(value) {
|
|
4611
4663
|
return value ?? void 0;
|
|
@@ -4932,6 +4984,16 @@ const LOOKUP_DELAYS_MS = [
|
|
|
4932
4984
|
2e3,
|
|
4933
4985
|
2e3
|
|
4934
4986
|
];
|
|
4987
|
+
/** Older stores may inherit a method that throws instead of omitting the hook. */
|
|
4988
|
+
async function updateStorageFeedbackReviewStatus(storage, feedback, logger) {
|
|
4989
|
+
if (typeof storage.updateFeedbackReviewStatus === "function") try {
|
|
4990
|
+
await storage.updateFeedbackReviewStatus(feedback);
|
|
4991
|
+
return;
|
|
4992
|
+
} catch (error) {
|
|
4993
|
+
if (typeof error !== "object" || error === null || !("id" in error) || error.id !== "OBSERVABILITY_STORAGE_UPDATE_FEEDBACK_REVIEW_STATUS_NOT_IMPLEMENTED") throw error;
|
|
4994
|
+
}
|
|
4995
|
+
logger.warn("Storage exporter skipped feedback review update: upgrade the storage adapter and @mastra/core");
|
|
4996
|
+
}
|
|
4935
4997
|
/**
|
|
4936
4998
|
* Resolve attached-storage context within a bounded retry window, including failed reads.
|
|
4937
4999
|
* Exhaustion returns null for missing anchors or throws the last read error for the exporter to report.
|
|
@@ -5002,6 +5064,7 @@ var DefaultExporter = class extends BaseExporter {
|
|
|
5002
5064
|
/** Storage writes (timer, size trigger, or flush()) that haven't finished yet */
|
|
5003
5065
|
#inFlightFlushes = /* @__PURE__ */ new Set();
|
|
5004
5066
|
#pendingAnnotations = /* @__PURE__ */ new Set();
|
|
5067
|
+
#feedbackWrites = new KeyedQueue();
|
|
5005
5068
|
#emitDropEvent;
|
|
5006
5069
|
#unsupportedSignals = /* @__PURE__ */ new Set();
|
|
5007
5070
|
constructor(config = {}) {
|
|
@@ -5357,6 +5420,9 @@ var DefaultExporter = class extends BaseExporter {
|
|
|
5357
5420
|
onScoreEvent(event) {
|
|
5358
5421
|
return this.enqueueAnnotation(event);
|
|
5359
5422
|
}
|
|
5423
|
+
onFeedbackReviewStatusEvent(event) {
|
|
5424
|
+
return this.enqueueAnnotation(event);
|
|
5425
|
+
}
|
|
5360
5426
|
onFeedbackReplacementEvent(event) {
|
|
5361
5427
|
return this.enqueueAnnotation(event);
|
|
5362
5428
|
}
|
|
@@ -5364,7 +5430,8 @@ var DefaultExporter = class extends BaseExporter {
|
|
|
5364
5430
|
return this.enqueueAnnotation(event);
|
|
5365
5431
|
}
|
|
5366
5432
|
enqueueAnnotation(event) {
|
|
5367
|
-
const
|
|
5433
|
+
const feedbackId = event.type === "score" ? void 0 : event.feedback.feedbackId;
|
|
5434
|
+
const pending = feedbackId ? this.#feedbackWrites.enqueue(feedbackId, () => this.storeAnnotation(event)) : this.storeAnnotation(event);
|
|
5368
5435
|
this.#pendingAnnotations.add(pending);
|
|
5369
5436
|
pending.then(() => this.#pendingAnnotations.delete(pending), () => this.#pendingAnnotations.delete(pending));
|
|
5370
5437
|
return pending;
|
|
@@ -5372,6 +5439,11 @@ var DefaultExporter = class extends BaseExporter {
|
|
|
5372
5439
|
async storeAnnotation(event) {
|
|
5373
5440
|
await this.waitForInit();
|
|
5374
5441
|
if (!this.#observabilityStorage) return;
|
|
5442
|
+
if (event.type === "feedback_review_status") {
|
|
5443
|
+
await this.flushBufferedEvents();
|
|
5444
|
+
await updateStorageFeedbackReviewStatus(this.#observabilityStorage, event.feedback, this.logger);
|
|
5445
|
+
return;
|
|
5446
|
+
}
|
|
5375
5447
|
const resolved = await resolveStorageAnnotation(event, this.#observabilityStorage, async () => {
|
|
5376
5448
|
await Promise.allSettled([...this.#inFlightFlushes]);
|
|
5377
5449
|
if (this.#eventBuffer.totalSize) await this.trackFlushBuffer();
|
|
@@ -5403,6 +5475,9 @@ var DefaultExporter = class extends BaseExporter {
|
|
|
5403
5475
|
*/
|
|
5404
5476
|
async flush() {
|
|
5405
5477
|
await Promise.allSettled([...this.#pendingAnnotations]);
|
|
5478
|
+
await this.flushBufferedEvents();
|
|
5479
|
+
}
|
|
5480
|
+
async flushBufferedEvents() {
|
|
5406
5481
|
for (let round = 0; round < MAX_FLUSH_ROUNDS$1; round++) {
|
|
5407
5482
|
if (this.#inFlightFlushes.size > 0) await Promise.allSettled([...this.#inFlightFlushes]);
|
|
5408
5483
|
if (this.#eventBuffer.totalSize > 0) {
|
|
@@ -5553,6 +5628,7 @@ var MastraStorageExporter = class extends BaseExporter {
|
|
|
5553
5628
|
/** Storage writes (timer, size trigger, or flush()) that haven't finished yet */
|
|
5554
5629
|
#inFlightFlushes = /* @__PURE__ */ new Set();
|
|
5555
5630
|
#pendingAnnotations = /* @__PURE__ */ new Set();
|
|
5631
|
+
#feedbackWrites = new KeyedQueue();
|
|
5556
5632
|
#emitDropEvent;
|
|
5557
5633
|
#unsupportedSignals = /* @__PURE__ */ new Set();
|
|
5558
5634
|
constructor(config = {}) {
|
|
@@ -6010,6 +6086,9 @@ var MastraStorageExporter = class extends BaseExporter {
|
|
|
6010
6086
|
onScoreEvent(event) {
|
|
6011
6087
|
return this.enqueueAnnotation(event);
|
|
6012
6088
|
}
|
|
6089
|
+
onFeedbackReviewStatusEvent(event) {
|
|
6090
|
+
return this.enqueueAnnotation(event);
|
|
6091
|
+
}
|
|
6013
6092
|
onFeedbackReplacementEvent(event) {
|
|
6014
6093
|
return this.enqueueAnnotation(event);
|
|
6015
6094
|
}
|
|
@@ -6017,7 +6096,8 @@ var MastraStorageExporter = class extends BaseExporter {
|
|
|
6017
6096
|
return this.enqueueAnnotation(event);
|
|
6018
6097
|
}
|
|
6019
6098
|
enqueueAnnotation(event) {
|
|
6020
|
-
const
|
|
6099
|
+
const feedbackId = event.type === "score" ? void 0 : event.feedback.feedbackId;
|
|
6100
|
+
const pending = feedbackId ? this.#feedbackWrites.enqueue(feedbackId, () => this.storeAnnotation(event)) : this.storeAnnotation(event);
|
|
6021
6101
|
this.#pendingAnnotations.add(pending);
|
|
6022
6102
|
pending.then(() => this.#pendingAnnotations.delete(pending), () => this.#pendingAnnotations.delete(pending));
|
|
6023
6103
|
return pending;
|
|
@@ -6025,6 +6105,11 @@ var MastraStorageExporter = class extends BaseExporter {
|
|
|
6025
6105
|
async storeAnnotation(event) {
|
|
6026
6106
|
await this.ensureInitialized();
|
|
6027
6107
|
if (!this.#observabilityStorage) return;
|
|
6108
|
+
if (event.type === "feedback_review_status") {
|
|
6109
|
+
await this.flushBufferedEvents();
|
|
6110
|
+
await updateStorageFeedbackReviewStatus(this.#observabilityStorage, event.feedback, this.logger);
|
|
6111
|
+
return;
|
|
6112
|
+
}
|
|
6028
6113
|
const resolved = await resolveStorageAnnotation(event, this.#observabilityStorage, async () => {
|
|
6029
6114
|
await Promise.allSettled([...this.#inFlightFlushes]);
|
|
6030
6115
|
if (this.#eventBuffer.totalSize) await this.trackFlushBuffer();
|
|
@@ -6056,6 +6141,9 @@ var MastraStorageExporter = class extends BaseExporter {
|
|
|
6056
6141
|
*/
|
|
6057
6142
|
async flush() {
|
|
6058
6143
|
await Promise.allSettled([...this.#pendingAnnotations]);
|
|
6144
|
+
await this.flushBufferedEvents();
|
|
6145
|
+
}
|
|
6146
|
+
async flushBufferedEvents() {
|
|
6059
6147
|
if (this.#byteTracker) {
|
|
6060
6148
|
if (!this.#observabilityStorage) return;
|
|
6061
6149
|
this.#byteDrainers++;
|
|
@@ -9084,7 +9172,7 @@ async function publishResolvedRecord(url, body, headers, method = "POST") {
|
|
|
9084
9172
|
}
|
|
9085
9173
|
const error = await response.json().catch(() => null);
|
|
9086
9174
|
const code = error?.code ?? error?.error?.code;
|
|
9087
|
-
if (!(response.status === 404 && (code === "TRACE_NOT_FOUND" || code === "SPAN_NOT_FOUND") || response.status === 503 && code === "ANCHOR_LOOKUP_UNAVAILABLE") || attempt === 5) throw new Error(`Platform record delivery failed: HTTP ${response.status}${code ? ` (${code})` : ""}`);
|
|
9175
|
+
if (!(method === "PATCH" ? response.status === 404 && code === "FEEDBACK_NOT_FOUND" || response.status === 503 && code === "FEEDBACK_LOOKUP_UNAVAILABLE" : response.status === 404 && (code === "TRACE_NOT_FOUND" || code === "SPAN_NOT_FOUND") || response.status === 503 && code === "ANCHOR_LOOKUP_UNAVAILABLE") || attempt === 5) throw new Error(`Platform record delivery failed: HTTP ${response.status}${code ? ` (${code})` : ""}`);
|
|
9088
9176
|
const retryAfter = response.headers.get("retry-after");
|
|
9089
9177
|
const retryAfterMs = retryAfter ? /^\d+(?:\.\d+)?$/.test(retryAfter) ? Number(retryAfter) * 1e3 : Date.parse(retryAfter) - Date.now() : 0;
|
|
9090
9178
|
const delay = Math.max(Math.min(500 * 2 ** attempt, 4e3), Number.isFinite(retryAfterMs) ? retryAfterMs : 0);
|
|
@@ -9222,6 +9310,7 @@ var MastraPlatformExporter = class extends BaseExporter {
|
|
|
9222
9310
|
flushTimer = null;
|
|
9223
9311
|
inFlightFlushes = /* @__PURE__ */ new Set();
|
|
9224
9312
|
pendingRecords = /* @__PURE__ */ new Set();
|
|
9313
|
+
feedbackUpdates = new KeyedQueue();
|
|
9225
9314
|
quotaPaused = false;
|
|
9226
9315
|
quotaProbeTimer = null;
|
|
9227
9316
|
quotaProbeIntervalSeconds = DEFAULT_QUOTA_PROBE_INTERVAL_SECONDS;
|
|
@@ -9327,6 +9416,16 @@ var MastraPlatformExporter = class extends BaseExporter {
|
|
|
9327
9416
|
}
|
|
9328
9417
|
this.enqueueResolvedRecord("feedback", event.feedback, event.feedback.feedbackId);
|
|
9329
9418
|
}
|
|
9419
|
+
onFeedbackReviewStatusEvent(event) {
|
|
9420
|
+
if (this.isDisabled || this.shuttingDown) return;
|
|
9421
|
+
const { feedbackId, reviewStatus } = event.feedback;
|
|
9422
|
+
if (!feedbackId?.trim() || !["needs-review", "reviewed"].includes(reviewStatus)) {
|
|
9423
|
+
this.logger.warn("Dropping feedback review update: feedbackId and reviewStatus are required");
|
|
9424
|
+
return;
|
|
9425
|
+
}
|
|
9426
|
+
const url = new URL(`/api/observability/feedback/${encodeURIComponent(feedbackId)}/review-status`, this.platformConfig.feedbackEndpoint);
|
|
9427
|
+
this.enqueueInteractiveWrite("feedback", url, JSON.stringify({ reviewStatus }), "PATCH", feedbackId);
|
|
9428
|
+
}
|
|
9330
9429
|
enqueueResolvedRecord(kind, record, replacementId) {
|
|
9331
9430
|
if (!record.traceId?.trim()) {
|
|
9332
9431
|
this.logger.warn(`Dropping ${kind}: context resolution requires traceId`);
|
|
@@ -9342,6 +9441,10 @@ var MastraPlatformExporter = class extends BaseExporter {
|
|
|
9342
9441
|
const collectorEndpoint = kind === "score" ? this.platformConfig.scoresEndpoint : this.platformConfig.feedbackEndpoint;
|
|
9343
9442
|
const url = new URL(`/api/observability/${kind === "score" ? "scores" : "feedback"}`, collectorEndpoint);
|
|
9344
9443
|
if (replacementId !== void 0) url.pathname += `/${encodeURIComponent(replacementId)}`;
|
|
9444
|
+
this.enqueueInteractiveWrite(kind, url, body, replacementId !== void 0 ? "PUT" : "POST", replacementId);
|
|
9445
|
+
}
|
|
9446
|
+
enqueueInteractiveWrite(kind, url, body, method, feedbackId) {
|
|
9447
|
+
const collectorEndpoint = kind === "score" ? this.platformConfig.scoresEndpoint : this.platformConfig.feedbackEndpoint;
|
|
9345
9448
|
const projectId = new URL(collectorEndpoint).pathname.match(/\/projects\/([^/]+)\/ai\//)?.[1] ?? this.platformConfig.projectId;
|
|
9346
9449
|
const headers = {
|
|
9347
9450
|
Authorization: `Bearer ${this.platformConfig.accessToken}`,
|
|
@@ -9349,7 +9452,8 @@ var MastraPlatformExporter = class extends BaseExporter {
|
|
|
9349
9452
|
...projectId ? { "X-Mastra-Project-Id": projectId } : {}
|
|
9350
9453
|
};
|
|
9351
9454
|
this.flushBatches().catch((error) => this.logger.warn("Failed to flush buffered telemetry", { error }));
|
|
9352
|
-
const
|
|
9455
|
+
const send = () => publishResolvedRecord(url, body, headers, method);
|
|
9456
|
+
const pending = (feedbackId !== void 0 ? this.feedbackUpdates.enqueue(feedbackId, send) : send()).catch((error) => this.logger.warn(`Dropping ${kind} after Platform delivery failed`, { error })).finally(() => this.pendingRecords.delete(pending));
|
|
9353
9457
|
this.pendingRecords.add(pending);
|
|
9354
9458
|
}
|
|
9355
9459
|
addToBuffer(event) {
|
|
@@ -11306,6 +11410,16 @@ var Observability = class extends MastraBase {
|
|
|
11306
11410
|
}
|
|
11307
11411
|
});
|
|
11308
11412
|
}
|
|
11413
|
+
async updateFeedbackReviewStatus(args) {
|
|
11414
|
+
if (!args.feedbackId?.trim() || !["needs-review", "reviewed"].includes(args.reviewStatus)) throw new Error("Feedback review update requires feedbackId and a valid reviewStatus");
|
|
11415
|
+
await this.#emitRecordedEvent({
|
|
11416
|
+
type: "feedback_review_status",
|
|
11417
|
+
feedback: {
|
|
11418
|
+
feedbackId: args.feedbackId,
|
|
11419
|
+
reviewStatus: args.reviewStatus
|
|
11420
|
+
}
|
|
11421
|
+
});
|
|
11422
|
+
}
|
|
11309
11423
|
/** @internal Queue an HTTP-created record; flush/shutdown await delivery without holding the HTTP response open. */
|
|
11310
11424
|
async __exportPersistedEvent(event) {
|
|
11311
11425
|
const storageExporters = new Set(this.#getRecordedTraceInstance()?.getExporters().filter(isMastraBuiltInStorageExporter));
|
|
@@ -11466,6 +11580,6 @@ const observabilityFeatures = /* @__PURE__ */ new Set(["model-inference-span", "
|
|
|
11466
11580
|
function buildTracingOptions(...updaters) {
|
|
11467
11581
|
return updaters.reduce((opts, updater) => updater(opts), {});
|
|
11468
11582
|
}
|
|
11469
|
-
export { BaseExporter, BaseObservabilityEventBus, BaseObservabilityInstance, BaseSpan, CardinalityFilter, CloudExporter, ConsoleExporter, DEFAULT_DEEP_CLEAN_OPTIONS, DEFAULT_LIMITS, DefaultExporter, DefaultObservabilityInstance, DefaultSpan, JsonExporter, LoggerContextImpl, MastraPlatformExporter, MastraStorageExporter, MetricsContextImpl, ModelSpanTracker, NoOpSpan, OBSERVABILITY_CAPABILITIES_HEADER, Observability, ObservabilityBus, QUOTA_PAUSE_CAPABILITY, SamplingStrategyType, SensitiveDataFilter, TestExporter, TraceData, TrackingExporter, buildExportedLog, buildExportedSpan, buildTracingOptions, chainFormatters, createClientObservabilityProxy, decodeResourceLogs, decodeResourceSpans, deepClean, formatBaggage, formatTraceparent, getExternalParentId, isSerializedMap, mergeSerializationOptions, observabilityConfigValueSchema, observabilityFeatures, observabilityInstanceConfigSchema, observabilityRegistryConfigSchema, otlpSeverityToLogLevel, parseBaggage, parseTraceparent, reconstructSerializedMap, routeToHandler, samplingStrategySchema, serializationOptionsSchema, truncateString };
|
|
11583
|
+
export { BaseExporter, BaseObservabilityEventBus, BaseObservabilityInstance, BaseSpan, CardinalityFilter, CloudExporter, ConsoleExporter, DEFAULT_DEEP_CLEAN_OPTIONS, DEFAULT_LIMITS, DefaultExporter, DefaultObservabilityInstance, DefaultSpan, JsonExporter, LoggerContextImpl, MastraPlatformExporter, MastraStorageExporter, MetricsContextImpl, ModelSpanTracker, NoOpSpan, OBSERVABILITY_CAPABILITIES_HEADER, Observability, ObservabilityBus, QUOTA_PAUSE_CAPABILITY, REDACTED_ERROR_MESSAGE, SamplingStrategyType, SensitiveDataFilter, TestExporter, TraceData, TrackingExporter, buildExportedLog, buildExportedSpan, buildTracingOptions, chainFormatters, createClientObservabilityProxy, decodeResourceLogs, decodeResourceSpans, deepClean, formatBaggage, formatTraceparent, getExternalParentId, isSerializedMap, mergeSerializationOptions, observabilityConfigValueSchema, observabilityFeatures, observabilityInstanceConfigSchema, observabilityRegistryConfigSchema, otlpSeverityToLogLevel, parseBaggage, parseTraceparent, reconstructSerializedMap, redactErrorInfo, routeToHandler, samplingStrategySchema, serializationOptionsSchema, truncateString };
|
|
11470
11584
|
|
|
11471
11585
|
//# sourceMappingURL=index.js.map
|