diff --git a/endpoints/openrtb2/video_auction.go b/endpoints/openrtb2/video_auction.go index ea1cd46b1af..9d161d4844b 100644 --- a/endpoints/openrtb2/video_auction.go +++ b/endpoints/openrtb2/video_auction.go @@ -113,14 +113,6 @@ func NewVideoEndpoint( 11. Build proper response format. */ func (deps *endpointDeps) VideoAuctionEndpoint(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { - start := time.Now() - - vo := analytics.VideoObject{ - Status: http.StatusOK, - Errors: make([]error, 0), - StartTime: start, - } - labels := metrics.Labels{ Source: metrics.DemandUnknown, RType: metrics.ReqTypeVideo, @@ -129,6 +121,14 @@ func (deps *endpointDeps) VideoAuctionEndpoint(w http.ResponseWriter, r *http.Re RequestStatus: metrics.RequestStatusOK, } + start := time.Now() + + vo := analytics.VideoObject{ + Status: http.StatusOK, + Errors: make([]error, 0), + StartTime: start, + } + debugQuery := r.URL.Query().Get("debug") cacheTTL := int64(3600) if deps.cfg.CacheURL.DefaultTTLs.Video > 0 {