add username in rum

This commit is contained in:
Alberto Xamin 2023-01-20 17:28:38 +00:00
parent ce0611cf8d
commit 0574117028
No known key found for this signature in database
GPG Key ID: 4F026F48309500A2
2 changed files with 3 additions and 1 deletions

View File

@ -149,7 +149,7 @@ export default {
defaultPrivacyLevel: 'allow',
proxyUrl: (Vue.config.devtools ? `http://${window.location.hostname}:5001` : window.location.origin) + '/ddproxy',
});
datadogRum.setUser({name: localStorage.getItem('username')})
datadogRum.startSessionReplayRecording();
},
created() {

View File

@ -54,6 +54,7 @@
import Card from '@/components/Card.vue'
import TinyHand from '@/components/TinyHand.vue'
// import Lobby from './components/Lobby.vue'
import { datadogRum } from '@datadog/browser-rum';
export default {
name: 'App',
@ -125,6 +126,7 @@ export default {
this.didSetUsername = true
localStorage.setItem('username', this.username)
this.$socket.emit('set_username', {name:this.username})
datadogRum.setUser({name: localStorage.getItem('username')})
e.preventDefault();
}
},