@mastra/observability 1.16.2 → 1.16.3-alpha.0
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/CHANGELOG.md +9 -0
- package/dist/default.d.ts.map +1 -1
- package/dist/index.cjs +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/model-tracing.d.ts.map +1 -1
- package/package.json +8 -7
package/dist/index.js
CHANGED
|
@@ -9272,13 +9272,16 @@ var Observability = class extends MastraBase {
|
|
|
9272
9272
|
const emitDropEvent = instance instanceof BaseObservabilityInstance ? (event) => instance.getObservabilityBus().emitDropEvent(event) : void 0;
|
|
9273
9273
|
exporters.forEach((exporter) => {
|
|
9274
9274
|
if ("init" in exporter && typeof exporter.init === "function") {
|
|
9275
|
-
|
|
9276
|
-
exporter.init({ mastra, config, emitDropEvent });
|
|
9277
|
-
} catch (error) {
|
|
9275
|
+
const handleInitError = (error) => {
|
|
9278
9276
|
this.logger?.warn("Failed to initialize observability exporter", {
|
|
9279
9277
|
exporterName: exporter.name,
|
|
9280
9278
|
error: error instanceof Error ? error.message : String(error)
|
|
9281
9279
|
});
|
|
9280
|
+
};
|
|
9281
|
+
try {
|
|
9282
|
+
void Promise.resolve(exporter.init({ mastra, config, emitDropEvent })).catch(handleInitError);
|
|
9283
|
+
} catch (error) {
|
|
9284
|
+
handleInitError(error);
|
|
9282
9285
|
}
|
|
9283
9286
|
}
|
|
9284
9287
|
});
|