Commit 026fc1fb authored by 孙傲's avatar 孙傲

统一上报增加 timestamp

parent 6b490591
{ {
"name": "nodejs-yitong-sdk", "name": "nodejs-yitong-sdk",
"version": "1.0.0", "version": "1.0.2",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
......
...@@ -377,6 +377,7 @@ function track(opts) { ...@@ -377,6 +377,7 @@ function track(opts) {
ctx.track = true; // 全部接口收集 ctx.track = true; // 全部接口收集
ctx.trackEvent = { ctx.trackEvent = {
__referer__: `${opts.serviceName}:${ctx.path}`, __referer__: `${opts.serviceName}:${ctx.path}`,
timestamp: Date.now(),
app_key: ctx.getAppKey() || _.get(ctx.token, 'aud') || opts.appKey, app_key: ctx.getAppKey() || _.get(ctx.token, 'aud') || opts.appKey,
event: { event: {
key: 'api' key: 'api'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment