增加网站每日独立IP统计

This commit is contained in:
GoEdgeLab
2024-04-12 20:12:09 +08:00
parent f1e368f85d
commit ca43d119e4
5 changed files with 442 additions and 12 deletions

View File

@@ -453,6 +453,9 @@ func (this *HTTPRequest) doEnd() {
stats.SharedTrafficStatManager.Add(this.ReqServer.UserId, this.ReqServer.Id, this.ReqHost, totalBytes, cachedBytes, 1, countCached, countAttacks, attackBytes, countWebsocketConnections, this.ReqServer.ShouldCheckTrafficLimit(), this.ReqServer.PlanId())
// unique IP
stats.SharedDAUManager.AddIP(this.ReqServer.Id, this.requestRemoteAddr(true))
// 指标
if metrics.SharedManager.HasHTTPMetrics() {
this.doMetricsResponse()