Skip to content

Commit

Permalink
Improve user datadog logging
Browse files Browse the repository at this point in the history
  • Loading branch information
gaspergrom committed Nov 12, 2024
1 parent 93009bd commit 5cd41c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
3 changes: 1 addition & 2 deletions frontend/src/modules/auth/store/auth.actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ export default {

Auth0Service.getUser().then((user) => {
if (user) {
console.log(user);
setRumUser(user.nickname);
setRumUser(user);
lfxHeader.authuser = user;
}
});
Expand Down
13 changes: 6 additions & 7 deletions frontend/src/utils/datadog/rum.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ export function initRUM() {
});
}

export function setRumUser(id) {
datadogRum.setUser({ id });
// datadogRum.setUser({
// id: user['https://sso.linuxfoundation.org/claims/username'], // Users LFID
// email: user.email, // Users Email
// name: user.name // Users full name
// });
export function setRumUser(user) {
datadogRum.setUser({
id: user['https://sso.linuxfoundation.org/claims/username'],
email: user.email,
name: user.name,
});
}

0 comments on commit 5cd41c8

Please sign in to comment.