import type { SqlClient, TraceEvent } from "./types.js"; /** * Opt-in tracing for `PgFileSystemOptions.trace`. Nothing here runs unless a * sink is configured: the constructor only wraps the client and the public * methods when one is. * * Op attribution rides an `AsyncLocalStorage` frame rather than a per-call * view object, so concurrent calls on one instance stay apart without * splitting the instance's caches (a view would re-resolve the version id and * change the very query counts being measured). */ type TraceSink = (event: TraceEvent) => void; export declare function traceSqlClient(inner: SqlClient, sink: TraceSink, inTransaction?: boolean): SqlClient; /** * Shadow each traced public method with an own-property wrapper that opens an * op frame for the duration of the call. Methods returning a non-promise * (async iterators such as `diffStream`) pass through untraced. */ export declare function traceMethods(target: object, sink: TraceSink): void; export {}; //# sourceMappingURL=trace.d.ts.map