Documentation ¶
Overview ¶
Example ¶
conn := pg.Connect(&pg.Options{ User: "go-pg-test", Database: "datadog", }) // Wrap the connection with the APM hook. pgtrace.Wrap(conn) var user struct { Name string } _, err := conn.QueryOne(&user, "SELECT name FROM users") if err != nil { log.Fatal(err) }
Output:
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Option ¶ added in v1.32.0
type Option func(*config)
Option represents an option that can be used to create or wrap a client.
func WithAnalytics ¶ added in v1.32.0
WithAnalytics enables Trace Analytics for all started spans.
func WithAnalyticsRate ¶ added in v1.32.0
WithAnalyticsRate sets the sampling rate for Trace Analytics events correlated to started spans.
func WithServiceName ¶ added in v1.32.0
WithServiceName sets the given service name for the client.
Click to show internal directories.
Click to hide internal directories.