diff --git a/exchange/exchange.go b/exchange/exchange.go index 4a2ae73802b..992f756a5ba 100644 --- a/exchange/exchange.go +++ b/exchange/exchange.go @@ -438,9 +438,6 @@ func (e *exchange) getAllBids( reqInfo.PbsEntryPoint = bidderRequest.BidderLabels.RType bids, err := e.adapterMap[bidderRequest.BidderCoreName].requestBid(ctx, bidderRequest.BidRequest, bidderRequest.BidderName, adjustmentFactor, conversions, &reqInfo, accountDebugAllowed) - // Setting bidderCoreName in SeatBid - bids.bidderCoreName = bidderRequest.BidderCoreName - // Add in time reporting elapsed := time.Since(start) brw.adapterBids = bids @@ -449,6 +446,9 @@ func (e *exchange) getAllBids( ae.ResponseTimeMillis = int(elapsed / time.Millisecond) if bids != nil { ae.HttpCalls = bids.httpCalls + + // Setting bidderCoreName in SeatBid + bids.bidderCoreName = bidderRequest.BidderCoreName } // Timing statistics @@ -514,9 +514,19 @@ func (e *exchange) recoverSafely(bidderRequests []BidderRequest, allBidders = sb.String()[:sb.Len()-1] } + bidderRequestStr := "" + if nil != bidderRequest.BidRequest { + value, err := json.Marshal(bidderRequest.BidRequest) + if nil == err { + bidderRequestStr = string(value) + } else { + bidderRequestStr = err.Error() + } + } + glog.Errorf("OpenRTB auction recovered panic from Bidder %s: %v. "+ - "Account id: %s, All Bidders: %s, Stack trace is: %v", - bidderRequest.BidderCoreName, r, bidderRequest.BidderLabels.PubID, allBidders, string(debug.Stack())) + "Account id: %s, All Bidders: %s, BidRequest: %s, Stack trace is: %v", + bidderRequest.BidderCoreName, r, bidderRequest.BidderLabels.PubID, allBidders, bidderRequestStr, string(debug.Stack())) e.me.RecordAdapterPanic(bidderRequest.BidderLabels) // Let the master request know that there is no data here brw := new(bidResponseWrapper)