Skip to content

Commit 8f33c6d

Browse files
authored
chore: track users' login methods in telemetry (coder#16664)
Addresses coder/nexus#191.
1 parent 546a549 commit 8f33c6d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

coderd/telemetry/telemetry.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,7 @@ func ConvertUser(dbUser database.User) User {
947947
CreatedAt: dbUser.CreatedAt,
948948
Status: dbUser.Status,
949949
GithubComUserID: dbUser.GithubComUserID.Int64,
950+
LoginType: string(dbUser.LoginType),
950951
}
951952
}
952953

@@ -1149,6 +1150,8 @@ type User struct {
11491150
RBACRoles []string `json:"rbac_roles"`
11501151
Status database.UserStatus `json:"status"`
11511152
GithubComUserID int64 `json:"github_com_user_id"`
1153+
// Omitempty for backwards compatibility.
1154+
LoginType string `json:"login_type,omitempty"`
11521155
}
11531156

11541157
type Group struct {

0 commit comments

Comments
 (0)