fix(monitor): Include request ip in monitored data

This commit is contained in:
Aditya Hase 2020-02-24 18:20:15 +05:30
parent 2b8c5a7f47
commit 268c577acd

View file

@ -42,6 +42,7 @@ class Monitor:
if self.transaction_type == "request":
self.data = frappe.form_dict
self.headers = dict(frappe.request.headers)
self.ip = frappe.local.request_ip
self.method = frappe.request.method
self.path = frappe.request.path
else:
@ -67,6 +68,7 @@ class Monitor:
update = {
"data": self.data,
"headers": self.headers,
"ip": self.ip,
"method": self.method,
"path": self.path,
}