Skip to main content

Function: exportRecords()

Defined in: src/utils/export.ts Exports records from a Galileo project. Defaults to the first log stream available if logStreamId and experimentId are not provided.

Parameters

options

Omit<{ columnIds?: string[]; experimentId?: null | string; exportFormat?: "csv" | "jsonl"; fileName?: null | string; filters?: object[] | object[] | object[] | object[] | object[] | object[] | object[]; logStreamId?: null | string; metricsTestingId?: null | string; redact?: boolean; rootType: "trace" | "session" | "span"; sort?: | null | { ascending?: boolean; columnId: string; sortType?: "column"; }; }, "filters" | "exportFormat"> & object & object Export parameters

Returns

Promise<AsyncIterable<string | Record<string, unknown>, any, any>> A Promise that resolves to an AsyncIterable that yields records based on the export format.
  • For JSONL format: Each record is a string containing a complete JSONL line (JSON object as string with trailing newline)
  • For JSON format: Each record is a Record<string, unknown> (parsed JSON object)
  • For CSV format: Each record is a string containing a complete CSV line (with trailing newline)