Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option specifies instrumentation configuration options.
func WithAttributes ¶
WithAttributes specifies additional attributes to be added to the span.
func WithOtelPgxTracer ¶
WithOtelPgxTracer specifies an otelpgx.Tracer to use for tracing pgx queries.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer. If none is specified, the global provider is used.
type OtelPgxTracer ¶
type Tracer ¶
type Tracer struct { *OtelPgxTracer // contains filtered or unexported fields }
Tracer is a wrapper around the pgx tracer interfaces which instrument queries.
func (*Tracer) TraceAcquireEnd ¶
func (t *Tracer) TraceAcquireEnd(ctx context.Context, pool *pgxpool.Pool, data pgxpool.TraceAcquireEndData)
TraceAcquireEnd is called when a connection has been acquired.
func (*Tracer) TraceAcquireStart ¶
func (t *Tracer) TraceAcquireStart(ctx context.Context, pool *pgxpool.Pool, data pgxpool.TraceAcquireStartData) context.Context
TraceAcquireStart is called at the beginning of Acquire. The returned context is used for the rest of the call and will be passed to the TraceAcquireEnd.