From 26aa5815c50890b1c151b968ea60fce7f1c23ba5 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Mon, 23 Jan 2017 10:08:55 -0800 Subject: updating timestamp precision --- system/api/analytics/init.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'system/api') diff --git a/system/api/analytics/init.go b/system/api/analytics/init.go index 3eccc13..f24425b 100644 --- a/system/api/analytics/init.go +++ b/system/api/analytics/init.go @@ -43,13 +43,15 @@ const RANGE = 14 func Record(req *http.Request) { external := strings.Contains(req.URL.Path, "/external/") + ts := int64(time.Nanosecond) * time.Now().UnixNano() / int64(time.Millisecond) + r := apiRequest{ URL: req.URL.String(), Method: req.Method, Origin: req.Header.Get("Origin"), Proto: req.Proto, RemoteAddr: req.RemoteAddr, - Timestamp: time.Now().Unix() * 1000, + Timestamp: ts, External: external, } -- cgit v1.2.3