@mastra/observability 1.15.2 → 1.16.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/dist/index.js CHANGED
@@ -8822,6 +8822,13 @@ var ObservabilityRegistry = class {
8822
8822
  }
8823
8823
  return deleted;
8824
8824
  }
8825
+ /**
8826
+ * Flush all registered instances without shutting down.
8827
+ */
8828
+ async flush() {
8829
+ const flushPromises = Array.from(this.#instances.values()).map((instance) => instance.flush());
8830
+ await Promise.allSettled(flushPromises);
8831
+ }
8825
8832
  /**
8826
8833
  * Shutdown all instances and clear the registry
8827
8834
  */
@@ -9265,6 +9272,10 @@ var Observability = class extends MastraBase {
9265
9272
  clear() {
9266
9273
  this.#registry.clear();
9267
9274
  }
9275
+ /** Flush all registered instances without shutting down. */
9276
+ async flush() {
9277
+ await this.#registry.flush();
9278
+ }
9268
9279
  /** Shut down all registered instances, flushing any pending data. */
9269
9280
  async shutdown() {
9270
9281
  await this.#registry.shutdown();