[IMP] iap: monitor performance of IAP calls

This commit adds loggs to monitor the performance of the IAP calls.

Related to task-3248852

Part-of: odoo/odoo#137703
This commit is contained in:
Guillaume (gdi)
2023-11-30 07:37:01 +00:00
committed by Guillaume-gdi
parent 40934f4089
commit de5a7d5038
+1
View File
@@ -124,6 +124,7 @@ def iap_jsonrpc(url, method='call', params=None, timeout=15):
req = requests.post(url, json=payload, timeout=timeout)
req.raise_for_status()
response = req.json()
_logger.info("iap jsonrpc %s answered in %s seconds", url, req.elapsed.total_seconds())
if 'error' in response:
name = response['error']['data'].get('name').rpartition('.')[-1]
message = response['error']['data'].get('message')