diff --git a/v3/integrations/logcontext-v2/nrslog/example/main.go b/v3/integrations/logcontext-v2/nrslog/example/main.go index 57a7d11d1..8126c03ec 100644 --- a/v3/integrations/logcontext-v2/nrslog/example/main.go +++ b/v3/integrations/logcontext-v2/nrslog/example/main.go @@ -24,8 +24,8 @@ func main() { log.Info("I am a log message") txn := app.StartTransaction("example transaction") - txnLogger := nrslog.WithTransaction(txn, log) - txnLogger.Info("I am a log inside a transaction") + txnCtx := newrelic.NewContext(context.Background(), txn) + txnLogger.InfoContext(txnCtx, "I am a log inside a transaction") // pretend to do some work time.Sleep(500 * time.Millisecond)