import { type ChildSpanAttributes } from "@opengeni/observability"; import type postgres from "postgres"; export type StatementSummary = { name: string; attributes: ChildSpanAttributes; }; /** Span name and attributes for one SQL statement, from its shape only. */ export declare function summarizeStatement(text: string): StatementSummary; /** * Record a client span from the query's first `then` (when postgres-js sends * it) to its settlement. Leaves `then` reconfigurable for later wrappers. */ export declare function traceQuery(query: postgres.PendingQuery, text: string): postgres.PendingQuery; /** * Run a transaction or savepoint under its own span, so its statements nest * beneath it and connection admission shows as the gap before the first one. */ export declare function traceTransaction(kind: "transaction" | "savepoint", run: () => Promise): Promise;