Show More
@@ -53,20 +53,20 b' class RequestWrapperTween(object):' | |||
|
53 | 53 | _path = safe_str(get_access_path(request.environ)) |
|
54 | 54 | ip = '127.0.0.1' |
|
55 | 55 | match_route = request.matched_route.name if request.matched_route else "NOT_FOUND" |
|
56 | resp_code = getattr(response, 'status_code', 'UNDEFINED') | |
|
56 | 57 | |
|
57 | 58 | total = time.time() - start |
|
58 | 59 | log.info( |
|
59 | 60 | 'Req[%4s] IP: %s %s Request to %s time: %.4fs [%s], VCSServer %s', |
|
60 | 61 | count, ip, request.environ.get('REQUEST_METHOD'), |
|
61 | 62 | _path, total, get_user_agent(request.environ), _ver_, |
|
62 | extra={"time": total, "ver": _ver_, | |
|
63 | extra={"time": total, "ver": _ver_, "code": resp_code, | |
|
63 | 64 | "path": _path, "view_name": match_route} |
|
64 | 65 | ) |
|
65 | 66 | |
|
66 | 67 | statsd = request.registry.statsd |
|
67 | 68 | if statsd: |
|
68 | 69 | match_route = request.matched_route.name if request.matched_route else _path |
|
69 | resp_code = getattr(response, 'status_code', 'UNDEFINED') | |
|
70 | 70 | elapsed_time_ms = round(1000.0 * total) # use ms only |
|
71 | 71 | statsd.timing( |
|
72 | 72 | "vcsserver_req_timing.histogram", elapsed_time_ms, |
General Comments 0
You need to be logged in to leave comments.
Login now