import { SpanRecord, TraceExporter } from "./types.js"; //#region src/exporters/jsonl.d.ts /** @internal - used by tests to override the date provider. */ type DateProvider = () => Date; /** * Configuration shape for {@link createJSONLExporter}. * * @stable */ interface JSONLExporterOptions { /** Identifier reported via `exporter.id`. Defaults to `'jsonl'`. */ readonly id?: string; /** Root directory for the trace files. Created if missing. */ readonly path: string; /** * Resolver that picks the file path for a given span record. Defaults * to `//.jsonl` keyed off the * `graphorin.session.id` attribute (or `unsessioned.jsonl` when * absent). */ readonly resolveFilePath?: (record: SpanRecord, root: string) => string; /** * Override the date used when picking the rotation directory. Defaults * to `() => new Date()`. * * @internal */ readonly now?: DateProvider; /** * Upper bound on simultaneously-open file handles. The pool keys * by `(session, UTC-month)`, so a long-living server would otherwise hold * one fd per pair forever; the least-recently-used handle is closed once * the cap is reached. Defaults to `64`. */ readonly maxOpenHandles?: number; } /** * A JSONL exporter, plus an introspection seam for the bounded handle pool. * * @stable */ interface JSONLExporter extends TraceExporter { /** Number of file handles currently open in the pool. */ openHandleCount(): number; } /** * Build a JSONL trace exporter. Call `withValidation(exporter)` before * passing the result to `createTracer({ exporters })`. * * @stable */ declare function createJSONLExporter(opts: JSONLExporterOptions): JSONLExporter; //#endregion export { DateProvider, JSONLExporter, JSONLExporterOptions, createJSONLExporter }; //# sourceMappingURL=jsonl.d.ts.map