Skip to content

Commit

Permalink
Merge pull request #278 from RichVanderwal/log-stack-trace-on-panic
Browse files Browse the repository at this point in the history
Log panic stack traces
  • Loading branch information
RichVanderwal committed Mar 17, 2021
2 parents 973b6a6 + 2887304 commit 1d27985
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions v3/newrelic/internal_txn.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ package newrelic
import (
"errors"
"fmt"
"log"
"net/http"
"net/url"
"reflect"
"runtime/debug"
"sync"
"time"

Expand Down Expand Up @@ -379,6 +381,7 @@ func (thd *thread) End(recovered interface{}) error {
e := txnErrorFromPanic(time.Now(), recovered)
e.Stack = getStackTrace()
thd.noticeErrorInternal(e)
log.Println(string(debug.Stack()))
}

txn.markEnd(time.Now(), thd.thread)
Expand Down

0 comments on commit 1d27985

Please sign in to comment.