Package-Level Type Names (total 7, in which 1 is exported)
/* sort exporteds by: | */
Tracer traces pgx v5 operations using [traces.Tracer]. It implements
[pgx.QueryTracer], [pgx.BatchTracer], [pgx.CopyFromTracer],
[pgx.PrepareTracer], [pgx.ConnectTracer], and [pgxpool.AcquireTracer].
Assign a Tracer to [pgx.ConnConfig.Tracer] (or pgxpool.Config.ConnConfig.Tracer).
Query arguments are never recorded; SQL text is recorded in db.query.text by
default and can be redacted or omitted via [Tracer.WithQueryText].
[pgx.ErrNoRows] is not marked as a span error.attrsfunc(ctx context.Context) []traces.Attrfilterfunc(ctx context.Context, op string) boolqueryTextfunc(sql string) (string, bool)spanNamefunc(op, db string) stringtracer*traces.Tracer TraceAcquireEnd implements the [pgxpool.AcquireTracer] interface. TraceAcquireStart implements the [pgxpool.AcquireTracer] interface. TraceBatchEnd implements the [pgx.BatchTracer] interface. TraceBatchQuery implements the [pgx.BatchTracer] interface. It records a
child span under the active batch span using data.ReadStartTime when
available. TraceBatchStart implements the [pgx.BatchTracer] interface. TraceConnectEnd implements the [pgx.ConnectTracer] interface. TraceConnectStart implements the [pgx.ConnectTracer] interface. TraceCopyFromEnd implements the [pgx.CopyFromTracer] interface. TraceCopyFromStart implements the [pgx.CopyFromTracer] interface. TracePrepareEnd implements the [pgx.PrepareTracer] interface. TracePrepareStart implements the [pgx.PrepareTracer] interface. TraceQueryEnd implements the [pgx.QueryTracer] interface. TraceQueryStart implements the [pgx.QueryTracer] interface. WithAttrs returns a [Tracer] using f to attach additional start-time
attributes for each operation. If f is nil, only default attributes are
added. WithFilter returns a [Tracer] that only traces operations for which f returns
true. The op argument is the uppercased SQL verb (such as "SELECT") or one of
"BATCH", "COPY", "PREPARE", "CONNECT", or "ACQUIRE". If f is nil, all
operations are traced. WithQueryText returns a [Tracer] using f to transform or filter SQL text
before recording it in db.query.text. Returning ok == false omits
db.query.text. If f is nil, it restores recording the SQL string as-is. WithSpanName returns a [Tracer] using f to compute the span name from the
operation and database namespace. If f is nil, it restores the default
"{op} {db}" naming.(*Tracer) allow(ctx context.Context, op string) bool(*Tracer) connAttrs(ctx context.Context, cfg *pgx.ConnConfig, op string) []traces.Attr
*Tracer : github.com/jackc/pgx/v5.BatchTracer
*Tracer : github.com/jackc/pgx/v5.ConnectTracer
*Tracer : github.com/jackc/pgx/v5.CopyFromTracer
*Tracer : github.com/jackc/pgx/v5.PrepareTracer
*Tracer : github.com/jackc/pgx/v5.QueryTracer
*Tracer : github.com/jackc/pgx/v5/pgxpool.AcquireTracer
func New(tr *traces.Tracer) *Tracer
func (*Tracer).WithAttrs(f func(ctx context.Context) []traces.Attr) *Tracer
func (*Tracer).WithFilter(f func(ctx context.Context, op string) bool) *Tracer
func (*Tracer).WithQueryText(f func(sql string) (text string, ok bool)) *Tracer
func (*Tracer).WithSpanName(f func(op, db string) string) *Tracer
sqlCollection extracts the target table name for common single-target SQL
statements (SELECT/DELETE ... FROM <table>, INSERT INTO <table>,
UPDATE <table>, TRUNCATE [TABLE] <table>). It returns "" for subqueries,
CTEs, or unrecognized syntax.