Skip to content

Commit

Permalink
fix(monitoring): fix download stat reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
aldor007 committed Apr 21, 2019
1 parent 48b11ca commit 2613667
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -299,18 +299,20 @@ func (r *RequestProcessor) handleGET(req *http.Request, obj *object.FileObject)
}()

} else {
monitoring.Report().Inc("request_type;type:download")

if res.StatusCode == 404 {
return r.handleNotFound(obj, parentObj, transformsTab, parentRes, res)
}

if res.StatusCode == 200 {
monitoring.Report().Inc("request_type;type:download")
if obj.CheckParent && parentObj != nil && parentRes.StatusCode == 200 {
return res
}

return res
}

if res.StatusCode == 404 {
return r.handleNotFound(obj, parentObj, transformsTab, parentRes, res)
}

return res
}
Expand Down

0 comments on commit 2613667

Please sign in to comment.