diff --git a/.travis.yml b/.travis.yml index a267473..1b9b562 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,8 @@ deploy: - LICENSE - kwikapi/api.py - kwikapi/__init__.py - name: kwikapi-0.2.7 - tag_name: 0.2.7 + name: kwikapi-0.2.8 + tag_name: 0.2.8 on: repo: deep-compute/kwikapi - provider: pypi diff --git a/kwikapi/api.py b/kwikapi/api.py index 29bc4a3..c12c9e5 100644 --- a/kwikapi/api.py +++ b/kwikapi/api.py @@ -385,7 +385,7 @@ def _resolve_call_info(self, request): namespace = namespace if namespace else None r.namespace = namespace or '' - request.log = self.log.bind(__requestid=request._id, + request.log = self.log.bind(__requestid=request.id, namespace=r.namespace, function=fn_name, apiid=self.api._id) @@ -473,7 +473,7 @@ 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='metric') + protocol=request.protocol, type='log') except Exception as e: message = e.message if hasattr(e, 'message') else str(e) diff --git a/kwikapi/client.py b/kwikapi/client.py index e963d7d..e473e42 100644 --- a/kwikapi/client.py +++ b/kwikapi/client.py @@ -75,7 +75,7 @@ def _prepare_request(self, post_body, get_params=None): headers = {} headers[PROTOCOL_HEADER] = self._protocol if self._request: - headers[REQUEST_ID_HEADER] = self.request.id + headers[REQUEST_ID_HEADER] = self._request.id upath = [self._version] + self._path upath = '/'.join(x for x in upath if x) diff --git a/setup.py b/setup.py index f42f907..9001df9 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -version = '0.2.7' +version = '0.2.8' setup( name="kwikapi", version=version, @@ -22,8 +22,8 @@ ], extras_require={ 'django': ['kwikapi-django==0.2.2'], - 'tornado': ['kwikapi-tornado==0.2.3'], - 'all': ['kwikapi-django==0.2.2', 'kwikapi-tornado==0.2.3'] + 'tornado': ['kwikapi-tornado==0.2.4'], + 'all': ['kwikapi-django==0.2.2', 'kwikapi-tornado==0.2.4'] }, classifiers=[ 'Environment :: Web Environment',