SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
fix: set userId as distinctId if failed to fetch IP
Ankit Nayan10faa6f42b00
diff --git a/pkg/query-service/telemetry/telemetry.go b/pkg/query-service/telemetry/telemetry.goindex 5de8392e0c..8a60be19da 100644--- a/pkg/query-service/telemetry/telemetry.go+++ b/pkg/query-service/telemetry/telemetry.go@@ -22,6 +22,7 @@ const ()const api_key = "4Gmoa4ixJAUHx2BpJxsjwA1bEfnwEeRz"+const IP_NOT_FOUND_PLACEHOLDER = "NA"var telemetry *Telemetryvar once sync.Once@@ -59,7 +60,7 @@ func createTelemetry() {// Get preferred outbound ip of this machinefunc getOutboundIP() string {- ip := []byte("NA")+ ip := []byte(IP_NOT_FOUND_PLACEHOLDER)resp, err := http.Get("https://api.ipify.org?format=text")if err != nil {@@ -116,7 +117,7 @@ func (a *Telemetry) SendEvent(event string, data map[string]interface{}) {}userId := a.ipAddress- if a.isTelemetryAnonymous() {+ if a.isTelemetryAnonymous() || userId == IP_NOT_FOUND_PLACEHOLDER {userId = a.GetDistinctId()}