Show More
@@ -179,7 +179,7 b' def exception_view(exc, request):' | |||||
179 |
|
179 | |||
180 | statsd = request.registry.statsd |
|
180 | statsd = request.registry.statsd | |
181 | if statsd: |
|
181 | if statsd: | |
182 | statsd.incr('rhodecode_exception_total', tags=["exc_source:api"]) |
|
182 | statsd.incr('rhodecode_exception_total', tags=["exc_source:api", "type:{}".format(exc_info.type)]) | |
183 |
|
183 | |||
184 | return jsonrpc_error(request, fault_message, rpc_id) |
|
184 | return jsonrpc_error(request, fault_message, rpc_id) | |
185 |
|
185 |
@@ -182,7 +182,8 b' def error_handler(exception, request):' | |||||
182 |
|
182 | |||
183 | statsd = request.registry.statsd |
|
183 | statsd = request.registry.statsd | |
184 | if statsd and base_response.status_code > 499: |
|
184 | if statsd and base_response.status_code > 499: | |
185 |
statsd.incr('rhodecode_exception_total', |
|
185 | statsd.incr('rhodecode_exception_total', | |
|
186 | tags=["exc_source:web", "type:{}".format(base_response.status_code)]) | |||
186 |
|
187 | |||
187 | error_explanation = base_response.explanation or str(base_response) |
|
188 | error_explanation = base_response.explanation or str(base_response) | |
188 | if base_response.status_code == 404: |
|
189 | if base_response.status_code == 404: |
@@ -179,7 +179,7 b' def task_failure_signal(' | |||||
179 | store_exception(id(exc_info), exc_info, prefix='rhodecode-celery') |
|
179 | store_exception(id(exc_info), exc_info, prefix='rhodecode-celery') | |
180 | statsd = StatsdClient.statsd |
|
180 | statsd = StatsdClient.statsd | |
181 | if statsd: |
|
181 | if statsd: | |
182 | statsd.incr('rhodecode_exception_total', tags=["exc_source:celery"]) |
|
182 | statsd.incr('rhodecode_exception_total', tags=["exc_source:celery", "type:{}".format(einfo.type)]) | |
183 |
|
183 | |||
184 | closer = celery_app.conf['PYRAMID_CLOSER'] |
|
184 | closer = celery_app.conf['PYRAMID_CLOSER'] | |
185 | if closer: |
|
185 | if closer: |
@@ -63,19 +63,20 b' class RequestWrapperTween(object):' | |||||
63 |
|
63 | |||
64 | statsd = request.registry.statsd |
|
64 | statsd = request.registry.statsd | |
65 | if statsd: |
|
65 | if statsd: | |
|
66 | match_route = request.matched_route.name if request.matched_route else _path | |||
66 | resp_code = response.status_code |
|
67 | resp_code = response.status_code | |
67 | elapsed_time_ms = 1000.0 * total |
|
68 | elapsed_time_ms = 1000.0 * total | |
68 | statsd.timing( |
|
69 | statsd.timing( | |
69 | 'rhodecode_req_timing', elapsed_time_ms, |
|
70 | 'rhodecode_req_timing', elapsed_time_ms, | |
70 | tags=[ |
|
71 | tags=[ | |
71 |
"view_name:{}".format( |
|
72 | "view_name:{}".format(match_route), | |
72 | #"user:{}".format(user_id), |
|
73 | #"user:{}".format(user_id), | |
73 | "code:{}".format(resp_code) |
|
74 | "code:{}".format(resp_code) | |
74 | ] |
|
75 | ] | |
75 | ) |
|
76 | ) | |
76 | statsd.incr( |
|
77 | statsd.incr( | |
77 | 'rhodecode_req_total', tags=[ |
|
78 | 'rhodecode_req_total', tags=[ | |
78 |
"view_name:{}".format( |
|
79 | "view_name:{}".format(match_route), | |
79 | #"user:{}".format(user_id), |
|
80 | #"user:{}".format(user_id), | |
80 | "code:{}".format(resp_code) |
|
81 | "code:{}".format(resp_code) | |
81 | ]) |
|
82 | ]) |
General Comments 0
You need to be logged in to leave comments.
Login now