Show More
@@ -182,7 +182,7 b' def error_handler(exception, request):' | |||
|
182 | 182 | |
|
183 | 183 | statsd = request.registry.statsd |
|
184 | 184 | if statsd and base_response.status_code > 499: |
|
185 | statsd.incr('rhodecode_exception') | |
|
185 | statsd.incr('rhodecode_exception', tags=["code:{}".format(base_response.status_code)]) | |
|
186 | 186 | |
|
187 | 187 | error_explanation = base_response.explanation or str(base_response) |
|
188 | 188 | if base_response.status_code == 404: |
@@ -34,6 +34,7 b' from rhodecode.lib.utils2 import safe_st' | |||
|
34 | 34 | from rhodecode.lib.exceptions import ( |
|
35 | 35 | HTTPLockedRC, HTTPBranchProtected, UserCreationError) |
|
36 | 36 | from rhodecode.model.db import Repository, User |
|
37 | from rhodecode.lib.statsd_client import StatsdClient | |
|
37 | 38 | |
|
38 | 39 | log = logging.getLogger(__name__) |
|
39 | 40 | |
@@ -219,6 +220,10 b' def post_pull(extras):' | |||
|
219 | 220 | 'user.pull', action_data={'user_agent': extras.user_agent}, |
|
220 | 221 | user=audit_user, repo=repo, commit=True) |
|
221 | 222 | |
|
223 | statsd = StatsdClient.statsd | |
|
224 | if statsd: | |
|
225 | statsd.incr('rhodecode_pull') | |
|
226 | ||
|
222 | 227 | output = '' |
|
223 | 228 | # make lock is a tri state False, True, None. We only make lock on True |
|
224 | 229 | if extras.make_lock is True and not is_shadow_repo(extras): |
@@ -264,6 +269,10 b' def post_push(extras):' | |||
|
264 | 269 | 'commit_ids': commit_ids[:400]}, |
|
265 | 270 | user=audit_user, repo=repo, commit=True) |
|
266 | 271 | |
|
272 | statsd = StatsdClient.statsd | |
|
273 | if statsd: | |
|
274 | statsd.incr('rhodecode_push') | |
|
275 | ||
|
267 | 276 | # Propagate to external components. |
|
268 | 277 | output = '' |
|
269 | 278 | # make lock is a tri state False, True, None. We only release lock on False |
@@ -69,15 +69,15 b' class RequestWrapperTween(object):' | |||
|
69 | 69 | statsd.timing( |
|
70 | 70 | 'rhodecode_req_timing', elapsed_time_ms, |
|
71 | 71 | tags=[ |
|
72 | "path:{}".format(_path), | |
|
73 | "user:{}".format(user_id), | |
|
72 | #"path:{}".format(_path), | |
|
73 | #"user:{}".format(user_id), | |
|
74 | 74 | "code:{}".format(resp_code) |
|
75 | 75 | ] |
|
76 | 76 | ) |
|
77 | 77 | statsd.incr( |
|
78 | 78 | 'rhodecode_req_count', tags=[ |
|
79 | "path:{}".format(_path), | |
|
80 | "user:{}".format(user_id), | |
|
79 | #"path:{}".format(_path), | |
|
80 | #"user:{}".format(user_id), | |
|
81 | 81 | "code:{}".format(resp_code) |
|
82 | 82 | ]) |
|
83 | 83 |
General Comments 0
You need to be logged in to leave comments.
Login now