change: set SendGA4Event timeout to 10s

This commit is contained in:
lilong.129
2025-07-28 00:01:26 +08:00
parent 5dd024fb59
commit ede57d60ef
2 changed files with 3 additions and 3 deletions

View File

@@ -64,7 +64,7 @@ func NewGA4Client(measurementID, apiSecret string, debug ...bool) *GA4Client {
apiSecret: apiSecret,
userID: userID,
httpClient: &http.Client{
Timeout: 5 * time.Second,
Timeout: 10 * time.Second,
},
debug: dbg,
}
@@ -206,6 +206,6 @@ func SendGA4Event(name string, params map[string]interface{}) {
}
err := ga4Client.SendEvent(event)
if err != nil {
log.Warn().Err(err).Msg("send GA4 event failed")
log.Debug().Err(err).Msg("send GA4 event failed")
}
}

View File

@@ -1 +1 @@
v5.0.0-250727
v5.0.0-250728