aliyun / aliyun-log-android-sdk

MIT License
180 stars 40 forks source link

日志 __time__ 属性与设备本地时间不一致 #94

Open shaobin0604 opened 1 year ago

shaobin0604 commented 1 year ago

日志库版本

com.aliyun.openservices:aliyun-log-android-sdk:2.6.4

间隔 5 秒生成两条日志

第一条:

{
  "type": "default",
  "ts": "1698219747762",
  "dataschema": "1",
  "contextschema": "2",
  "__pack_meta__": "12|MTY5NDE4ODU4OTAwNzQ4ODcwOQ==|65|26",
  "__topic__": "log",
  "__source__": "Android",
  "__tag__:__client__": "FSF",
  "__tag__:__pack_id__": "30C906CEC09B9421-0",
  "__tag__:__client_ip__": "110.184.125.12",
  "__tag__:__receive_time__": "1698219761",
  "__time__": "1698219760"
}

第二条:

{
  "type": "default",
  "ts": "1698219752783",
  "dataschema": "1",
  "contextschema": "2",
  "__pack_meta__": "12|MTY5NDE4ODU4OTAwNzQ4ODcwOQ==|65|32",
  "__topic__": "log",
  "__source__": "Android",
  "__tag__:__client__": "FSF",
  "__tag__:__pack_id__": "30C906CEC09B9421-0",
  "__tag__:__client_ip__": "110.184.125.12",
  "__tag__:__receive_time__": "1698219761",
  "__time__": "1698219760"
}

两条日志的本地时间戳 ts 相差 1698219752783 - 1698219747762 = 5021 毫秒,符合预期。 但两条日志的 __time__ 属性 居然 完全相等