# HG changeset patch # User RhodeCode Admin # Date 2022-10-25 11:07:44 # Node ID 095071a6ec82247434236e6e39aa42c2a98d077c # Parent 31da2c8864e874cddda434c2626568680197271f metrics: use promethues naming diff --git a/vcsserver/http_main.py b/vcsserver/http_main.py --- a/vcsserver/http_main.py +++ b/vcsserver/http_main.py @@ -400,7 +400,7 @@ class HTTPApplication(object): statsd = request.registry.statsd if statsd: statsd.incr( - 'vcsserver_method_count', tags=[ + 'vcsserver_method_total', tags=[ "method:{}".format(method), ]) return payload, remote, method, args, kwargs @@ -690,7 +690,7 @@ class HTTPApplication(object): statsd = request.registry.statsd if statsd: - statsd.incr('vcsserver_exception') + statsd.incr('vcsserver_exception_total') raise exception diff --git a/vcsserver/tweens/request_wrapper.py b/vcsserver/tweens/request_wrapper.py --- a/vcsserver/tweens/request_wrapper.py +++ b/vcsserver/tweens/request_wrapper.py @@ -63,14 +63,10 @@ class RequestWrapperTween(object): elapsed_time_ms = 1000.0 * total statsd.timing( 'vcsserver_req_timing', elapsed_time_ms, - tags=[ - "path:{}".format(_path), - ] + tags=["path:{}".format(_path)] ) statsd.incr( - 'vcsserver_req_count', tags=[ - "path:{}".format(_path), - ]) + 'vcsserver_req_total', tags=["path:{}".format(_path)]) return response