mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 02:29:03 +08:00
fix: minor changes
This commit is contained in:
parent
1fd819b806
commit
16a49a8b04
@ -315,11 +315,11 @@ func (s *Server) analyticsMiddleware(next http.Handler) http.Handler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if telemetry.GetInstance().IsSampled() {
|
// if telemetry.GetInstance().IsSampled() {
|
||||||
if _, ok := telemetry.IgnoredPaths()[path]; !ok {
|
if _, ok := telemetry.IgnoredPaths()[path]; !ok {
|
||||||
telemetry.GetInstance().SendEvent(telemetry.TELEMETRY_EVENT_PATH, data)
|
telemetry.GetInstance().SendEvent(telemetry.TELEMETRY_EVENT_PATH, data)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// }
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -164,6 +164,8 @@ func (mds *ModelDaoSqlite) EditOrg(ctx context.Context, org *model.Organization)
|
|||||||
}
|
}
|
||||||
|
|
||||||
telemetry.GetInstance().SetTelemetryAnonymous(org.IsAnonymous)
|
telemetry.GetInstance().SetTelemetryAnonymous(org.IsAnonymous)
|
||||||
|
telemetry.GetInstance().SetDistinctId(org.Id)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,10 +228,10 @@ func getOutboundIP() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *Telemetry) IdentifyUser(user *model.User) {
|
func (a *Telemetry) IdentifyUser(user *model.User) {
|
||||||
|
a.SetCompanyDomain(user.Email)
|
||||||
if !a.isTelemetryEnabled() || a.isTelemetryAnonymous() {
|
if !a.isTelemetryEnabled() || a.isTelemetryAnonymous() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
a.SetCompanyDomain(user.Email)
|
|
||||||
|
|
||||||
a.operator.Enqueue(analytics.Identify{
|
a.operator.Enqueue(analytics.Identify{
|
||||||
UserId: a.ipAddress,
|
UserId: a.ipAddress,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user