mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-08 19:28:57 +08:00
Merge pull request #769 from ankitnayan/feat/opt-out
feat: adding org name and adding opt-out
This commit is contained in:
commit
3a67d0237c
@ -683,8 +683,9 @@ func (aH *APIHandler) user(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
telemetry.GetInstance().IdentifyUser(user)
|
telemetry.GetInstance().IdentifyUser(user)
|
||||||
data := map[string]interface{}{
|
data := map[string]interface{}{
|
||||||
"name": user.Name,
|
"name": user.Name,
|
||||||
"email": user.Email,
|
"email": user.Email,
|
||||||
|
"organizationName": user.OrganizationName,
|
||||||
}
|
}
|
||||||
telemetry.GetInstance().SendEvent(telemetry.TELEMETRY_EVENT_USER, data)
|
telemetry.GetInstance().SendEvent(telemetry.TELEMETRY_EVENT_USER, data)
|
||||||
|
|
||||||
@ -1108,6 +1109,12 @@ func (aH *APIHandler) setUserPreferences(w http.ResponseWriter, r *http.Request)
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data := map[string]interface{}{
|
||||||
|
"hasOptedUpdates": userParams.HasOptedUpdates,
|
||||||
|
"isAnonymous": userParams.IsAnonymous,
|
||||||
|
}
|
||||||
|
telemetry.GetInstance().SendEvent(telemetry.TELEMETRY_EVENT_USER_PREFERENCES, data)
|
||||||
|
|
||||||
aH.writeJSON(w, r, map[string]string{"data": "user preferences set successfully"})
|
aH.writeJSON(w, r, map[string]string{"data": "user preferences set successfully"})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,9 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type User struct {
|
type User struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Email string `json:"email"`
|
Email string `json:"email"`
|
||||||
|
OrganizationName string `json:"organizationName"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type InstantQueryMetricsParams struct {
|
type InstantQueryMetricsParams struct {
|
||||||
|
@ -18,6 +18,7 @@ const (
|
|||||||
TELEMETRY_EVENT_INPRODUCT_FEEDBACK = "InProduct Feeback Submitted"
|
TELEMETRY_EVENT_INPRODUCT_FEEDBACK = "InProduct Feeback Submitted"
|
||||||
TELEMETRY_EVENT_NUMBER_OF_SERVICES = "Number of Services"
|
TELEMETRY_EVENT_NUMBER_OF_SERVICES = "Number of Services"
|
||||||
TELEMETRY_EVENT_HEART_BEAT = "Heart Beat"
|
TELEMETRY_EVENT_HEART_BEAT = "Heart Beat"
|
||||||
|
TELEMETRY_EVENT_USER_PREFERENCES = "User Preferences"
|
||||||
)
|
)
|
||||||
|
|
||||||
const api_key = "4Gmoa4ixJAUHx2BpJxsjwA1bEfnwEeRz"
|
const api_key = "4Gmoa4ixJAUHx2BpJxsjwA1bEfnwEeRz"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user