diff options
author | Steve Manuel <nilslice@gmail.com> | 2017-01-23 10:08:55 -0800 |
---|---|---|
committer | Steve Manuel <nilslice@gmail.com> | 2017-01-23 10:08:55 -0800 |
commit | 26aa5815c50890b1c151b968ea60fce7f1c23ba5 (patch) | |
tree | 730ee49ef4af2bac91e158989a4b7d17161dd4f5 /system/api/analytics | |
parent | 35204659b542175d5e4f352c24374f29974cf5fe (diff) |
updating timestamp precision
Diffstat (limited to 'system/api/analytics')
-rw-r--r-- | system/api/analytics/init.go | 4 |
1 files changed, 3 insertions, 1 deletions
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, } |