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.

fix(users): skip sending email if frontend base url is not set (#8459)

Vibhu Pandey4563ff0e6242
diff --git a/pkg/modules/user/impluser/module.go b/pkg/modules/user/impluser/module.go
index 5b6793aac8..e22cb1c0ca 100644
--- a/pkg/modules/user/impluser/module.go
+++ b/pkg/modules/user/impluser/module.go
@@ -91,10 +91,15 @@ func (m *Module) CreateBulkInvite(ctx context.Context, orgID, userID string, bul
return nil, err
}
- // send telemetry event
for i := 0; i < len(invites); i++ {
m.analytics.TrackUser(ctx, orgID, creator.ID.String(), "Invite Sent", map[string]any{"invitee_email": invites[i].Email, "invitee_role": invites[i].Role})
+ // if the frontend base url is not provided, we don't send the email
+ if bulkInvites.Invites[i].FrontendBaseUrl == "" {
+ m.settings.Logger().InfoContext(ctx, "frontend base url is not provided, skipping email", "invitee_email", invites[i].Email)
+ continue
+ }
+
if err := m.emailing.SendHTML(ctx, invites[i].Email, "You are invited to join a team in SigNoz", emailtypes.TemplateNameInvitationEmail, map[string]any{
"CustomerName": invites[i].Name,
"InviterName": creator.DisplayName,