Skip to content

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.

chore: add user email to log_comment (#6461)

Srikanth Chekuri493ae4fd0793
diff --git a/pkg/query-service/app/server.go b/pkg/query-service/app/server.go
index dc6ac21e15..6a030e73cf 100644
--- a/pkg/query-service/app/server.go
+++ b/pkg/query-service/app/server.go
@@ -384,6 +384,11 @@ func LogCommentEnricher(next http.Handler) http.Handler {
client = "api"
}
+ email, err := auth.GetEmailFromJwt(r.Context())
+ if err != nil {
+ zap.S().Errorf("error while getting email from jwt: %v", err)
+ }
+
kvs := map[string]string{
"path": path,
"dashboardID": dashboardID,
@@ -392,6 +397,7 @@ func LogCommentEnricher(next http.Handler) http.Handler {
"client": client,
"viewName": viewName,
"servicesTab": tab,
+ "email": email,
}
r = r.WithContext(context.WithValue(r.Context(), common.LogCommentKey, kvs))