@mastra/core
Version:
27 lines • 1.32 kB
TypeScript
import type { IMastraLogger } from '../logger/index.js';
import type { MastraCompositeStore } from '../storage/base.js';
import type { ExperimentsStorage } from '../storage/domains/experiments/base.js';
import type { ExperimentTenancyFilters } from '../storage/types.js';
/**
* Deletes the observability traces produced by an experiment, along with everything
* `batchDeleteTraces` cascades to (spans, trace roots/branches, and trace-linked
* scores, feedback, metrics and logs).
*
* Trace ids come from the experiment's own result rows, which are read with the
* caller's tenancy filters — so only traces belonging to the caller's experiment
* are ever collected. The tenant scope is forwarded to storage as defense in depth.
*
* Must run *before* the relational delete: `deleteExperiment` cascades away the
* result rows that carry the trace ids.
*
* @returns the trace ids that were passed to the cascade, or an empty array when
* the experiment recorded none or the store cannot perform the cascade.
*/
export declare function deleteExperimentTraces(args: {
storage: MastraCompositeStore;
experimentsStore: ExperimentsStorage;
experimentId: string;
filters?: ExperimentTenancyFilters;
logger?: IMastraLogger;
}): Promise<string[]>;
//# sourceMappingURL=experiment-traces.d.ts.map