File tree Expand file tree Collapse file tree
crates/common/src/integrations Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -837,7 +837,19 @@ impl AuctionProvider for PrebidAuctionProvider {
837837 transform_prebid_response ( & mut response_json, & request_host, & request_scheme) ?;
838838 }
839839
840- let auction_response = self . parse_openrtb_response ( & response_json, response_time_ms) ;
840+ let mut auction_response = self . parse_openrtb_response ( & response_json, response_time_ms) ;
841+
842+ // Attach per-bidder timing and errors from the Prebid Server response.
843+ // `responsetimemillis` contains an entry for every invited bidder, even
844+ // those that returned no bids, making it the canonical source for
845+ // "who was in the auction."
846+ let ext = response_json. get ( "ext" ) ;
847+ if let Some ( rtm) = ext. and_then ( |e| e. get ( "responsetimemillis" ) ) {
848+ auction_response = auction_response. with_metadata ( "responsetimemillis" , rtm. clone ( ) ) ;
849+ }
850+ if let Some ( errors) = ext. and_then ( |e| e. get ( "errors" ) ) {
851+ auction_response = auction_response. with_metadata ( "errors" , errors. clone ( ) ) ;
852+ }
841853
842854 log:: info!(
843855 "Prebid returned {} bids in {}ms" ,
You can’t perform that action at this time.
0 commit comments