Skip to content

Commit

Permalink
fixed nrgrpc and nrsqlite3 examples
Browse files Browse the repository at this point in the history
  • Loading branch information
nr-swilloughby committed May 19, 2022
1 parent c2426df commit a08d833
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions v3/integrations/nrgrpc/example/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ func main() {
}
defer app.Shutdown(10 * time.Second)

app.WaitForConnection(10 * time.Second)
txn := app.StartTransaction("main")
defer txn.End()

Expand Down
4 changes: 4 additions & 0 deletions v3/integrations/nrsqlite3/example/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit a08d833

Please # to comment.