diff --git a/management/server/account.go b/management/server/account.go index ab1ffe8b3..f1ab3a182 100644 --- a/management/server/account.go +++ b/management/server/account.go @@ -9,6 +9,7 @@ import ( "os" "reflect" "regexp" + "runtime/debug" "slices" "strconv" "strings" @@ -1054,6 +1055,9 @@ func (am *DefaultAccountManager) addNewUserToDomainAccount(ctx context.Context, return "", err } + log.WithContext(ctx).Debugf("created new regular user ID: %s, domainAccountId: %s, accountID: %s Trace: %s", userAuth.UserId, + domainAccountID, userAuth.AccountId, debug.Stack(), + ) am.StoreEvent(ctx, userAuth.UserId, userAuth.UserId, domainAccountID, activity.UserJoined, nil) return domainAccountID, nil diff --git a/management/server/store/sql_store.go b/management/server/store/sql_store.go index 7d3b288e0..c2878effb 100644 --- a/management/server/store/sql_store.go +++ b/management/server/store/sql_store.go @@ -209,6 +209,10 @@ func (s *SqlStore) SaveAccount(ctx context.Context, account *types.Account) erro if s.metrics != nil { s.metrics.StoreMetrics().CountPersistenceDuration(took) } + + data, _ := json.MarshalIndent(account, "", " ") + log.WithContext(ctx).Debugf("saved an account Account ID: %s, state: %s Trace: %s", account.Id, data, debug.Stack()) + log.WithContext(ctx).Debugf("took %d ms to persist an account to the store", took.Milliseconds()) return err