diff --git a/contrib/go-pg/pg.v10/example_test.go b/contrib/go-pg/pg.v10/example_test.go index cec93fd850..33f455c24a 100644 --- a/contrib/go-pg/pg.v10/example_test.go +++ b/contrib/go-pg/pg.v10/example_test.go @@ -22,11 +22,10 @@ func Example() { // Wrap the connection with the APM hook pgtrace.Wrap(conn) - // For correct tracing, must be query execute with context. var user struct { Name string } - _, err := conn.WithContext(context.Background()).QueryOne(&user, "SELECT name FROM users") + _, err := conn.QueryOne(&user, "SELECT name FROM users") if err != nil { log.Fatal(err) }