日志优化

This commit is contained in:
hahwu 2026-01-21 17:25:55 +08:00
parent dd90f57f70
commit 892b6408d3

View File

@ -3,6 +3,7 @@ package thinkingdata
import (
"errors"
"sync"
"time"
)
const (
@ -27,6 +28,7 @@ type Data struct {
DistinctId string `json:"#distinct_id,omitempty"`
Type string `json:"#type"`
Time string `json:"#time"`
Timestamp int64 `json:"#timestamp,omitempty"`
EventName string `json:"#event_name,omitempty"`
EventId string `json:"#event_id,omitempty"`
FirstCheckId string `json:"#first_check_id,omitempty"`
@ -279,6 +281,7 @@ func (ta *TDAnalytics) add(accountId, distinctId, dataType, eventName, eventId s
DistinctId: distinctId,
Type: dataType,
Time: eventTime,
Timestamp: time.Now().Unix(),
EventName: eventName,
EventId: eventId,
FirstCheckId: firstCheckId,