@mastra/observability 1.18.4-alpha.0 → 1.18.4-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/exporters/tracking.d.ts.map +1 -1
- package/dist/index.cjs +20 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6256,6 +6256,15 @@ var TrackingExporter = class extends BaseExporter {
|
|
|
6256
6256
|
});
|
|
6257
6257
|
return true;
|
|
6258
6258
|
case "handleSpanEnd":
|
|
6259
|
+
if (!traceData.hasSpan({ spanId: exportedSpan.id })) {
|
|
6260
|
+
traceData.addToWaitingQueue({
|
|
6261
|
+
event,
|
|
6262
|
+
waitingFor: exportedSpan.id,
|
|
6263
|
+
attempts: queuedEvent.attempts,
|
|
6264
|
+
queuedAt: queuedEvent.queuedAt
|
|
6265
|
+
});
|
|
6266
|
+
return true;
|
|
6267
|
+
}
|
|
6259
6268
|
traceData.endSpan({ spanId: exportedSpan.id });
|
|
6260
6269
|
await this._finishSpan({
|
|
6261
6270
|
span: exportedSpan,
|
|
@@ -6577,6 +6586,17 @@ var TrackingExporter = class extends BaseExporter {
|
|
|
6577
6586
|
traceId: exportedSpan.traceId,
|
|
6578
6587
|
spanId: exportedSpan.id
|
|
6579
6588
|
});
|
|
6589
|
+
if (!traceData.hasSpan({ spanId: exportedSpan.id })) {
|
|
6590
|
+
this.logger.debug(`${this.name}: adding span end to waiting queue`, {
|
|
6591
|
+
traceId: exportedSpan.traceId,
|
|
6592
|
+
waitingFor: exportedSpan.id
|
|
6593
|
+
});
|
|
6594
|
+
traceData.addToWaitingQueue({
|
|
6595
|
+
event,
|
|
6596
|
+
waitingFor: exportedSpan.id
|
|
6597
|
+
});
|
|
6598
|
+
break;
|
|
6599
|
+
}
|
|
6580
6600
|
traceData.endSpan({ spanId: exportedSpan.id });
|
|
6581
6601
|
await this._finishSpan({
|
|
6582
6602
|
span: exportedSpan,
|