New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: move datadog rum methods to service (DEV-190) #572
Conversation
src/app/app.component.ts
Outdated
) { | ||
|
||
// set the page title | ||
this._titleService.setTitle('DaSCH Service Platform'); | ||
|
||
// init datadog RUM | ||
this._datadogRumService.initializeRum(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the datadogRumService
initialized here and not at time of construction?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed in a48ea3d
} | ||
} | ||
|
||
setActiveUser(identifier: any, identifierType: 'iri' | 'email' | 'username'): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you need to check if datadogRum is initialized, and only then set the user. Otherwise you can probably ignore it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed in a48ea3d
} | ||
|
||
removeActiveUser(): void { | ||
datadogRum.removeUser(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
likewise, check if datadogRum is initialized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed in a48ea3d
…cks if datadog has been initialized before adding or removing a user session
resolves DEV-190