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 ¶
type Option func(*config)
Option represents an option that can be used to create or wrap a client.
func WithAnalytics ¶
WithAnalytics enables Trace Analytics for all started spans.
func WithAnalyticsRate ¶
WithAnalyticsRate sets the sampling rate for Trace Analytics events correlated to started spans.
func WithServiceName ¶
WithServiceName sets the given service name for the client.
Click to show internal directories.
Click to hide internal directories.