From a08d833e64d5e591966382a2823820cc8effad6a Mon Sep 17 00:00:00 2001 From: Steve Willoughby Date: Thu, 19 May 2022 14:54:05 -0700 Subject: [PATCH] fixed nrgrpc and nrsqlite3 examples --- v3/integrations/nrgrpc/example/client/client.go | 1 + v3/integrations/nrsqlite3/example/main.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/v3/integrations/nrgrpc/example/client/client.go b/v3/integrations/nrgrpc/example/client/client.go index 66fdf5b11..8f7cac0cb 100644 --- a/v3/integrations/nrgrpc/example/client/client.go +++ b/v3/integrations/nrgrpc/example/client/client.go @@ -100,6 +100,7 @@ func main() { } defer app.Shutdown(10 * time.Second) + app.WaitForConnection(10 * time.Second) txn := app.StartTransaction("main") defer txn.End() diff --git a/v3/integrations/nrsqlite3/example/main.go b/v3/integrations/nrsqlite3/example/main.go index 9d1e1c0d1..3463413c2 100644 --- a/v3/integrations/nrsqlite3/example/main.go +++ b/v3/integrations/nrsqlite3/example/main.go @@ -30,7 +30,11 @@ func main() { newrelic.ConfigLicense(os.Getenv("NEW_RELIC_LICENSE_KEY")), newrelic.ConfigDebugLogger(os.Stdout), ) + if err != nil { + panic(err) + } + app.WaitForConnection(10 * time.Second) txn := app.StartTransaction("sqliteQuery") ctx := newrelic.NewContext(context.Background(), txn) row := db.QueryRowContext(ctx, "SELECT count(*) from zaps")