From 362841ef78a03927f5b90a195edf1927c807bb67 Mon Sep 17 00:00:00 2001 From: Sri Harsha Date: Tue, 7 Aug 2018 13:42:05 +0530 Subject: [PATCH 1/2] implemented logged metrics and included params in error logs --- kwikapi/api.py | 5 +++-- setup.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/kwikapi/api.py b/kwikapi/api.py index 6f1ed86..0e7c352 100644 --- a/kwikapi/api.py +++ b/kwikapi/api.py @@ -481,14 +481,15 @@ def handle_request(self, request): method=rinfo.method, compute_time=tcompute, serialize_time=t.value, deserialize_time=rinfo.time_deserialize, __params=get_loggable_params(request.fn_params or {}), - protocol=request.protocol, type='log', **request.metrics) + protocol=request.protocol, type='logged_metric', **request.metrics) except Exception as e: message = e.message if hasattr(e, 'message') else str(e) message = '[(%s) %s: %s]' % (self.api._id, e.__class__.__name__, message) _log = request.log if hasattr(request, 'log') else self.log - _log.exception('handle_request_error', message=message) + _log.exception('handle_request_error', message=message, + __params=get_loggable_params(request.fn_params or {})) response.write(dict(success=False, message=message), protocol) response.flush() diff --git a/setup.py b/setup.py index 3cf2bac..ebe71ea 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -version = '0.4.0' +version = '0.4.1' setup( name="kwikapi", version=version, From 02ea2988a5e30ceab7c8cd3518fbc1d189dbaf1e Mon Sep 17 00:00:00 2001 From: Sri Harsha Date: Tue, 7 Aug 2018 14:43:04 +0530 Subject: [PATCH 2/2] updated travis version --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index ac965fd..b236fb7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,8 @@ deploy: - LICENSE - kwikapi/api.py - kwikapi/__init__.py - name: kwikapi-0.4.0 - tag_name: 0.4.0 + name: kwikapi-0.4.1 + tag_name: 0.4.1 on: repo: deep-compute/kwikapi - provider: pypi