Identifying End Users in Sentry — Transcript

Transcript of the free Vue.js lesson Identifying End Users in Sentrywatch the video lesson.

Knowing the particular user that triggered an error can be helpful. We can do this by using the sentry method setUser. js. However, typically this will be done dynamically after a user has been authenticated.

Now setUser takes the user object and that user can be identified with an ID, email address, username, or IP address. For our case, I'll hardcode an email address. Okay, to see what this provides for us in Sentry, let's trigger that Make Toast error again. In the browser, I'll click Make Toast.

Once again, the error is shown in the console. And if we go check things out in Sentry, I'll give it a few moments to update. And yeah. we see that the issue has fired again, 23 seconds ago.

Alright, let's click into it and see what kind of information we can see about the user. Scrolling down to the bottom, we can see in the user section that the email address has been recorded. Nice. Also, we can click the number under the users label in the top right corner of the page to get a breakdown of which users were affected.

In our case, it's two users. One with the email address we just provided, as well as a user identified by my IP address before we provided the email. Awesome. Finally, if you ever need to clear the user from Sentry, like after a user logs out, you can call the configure scope method and then call set user with a null argument.

Knowing the particular user that triggered an error can be helpful. We can do this by using the sentry method setUser. js. However, typically this will be done dynamically after a user has been authenticated.

Now setUser takes the user object and that user can be identified with an ID, email address, username, or IP address. For our case, I'll hardcode an email address. Okay, to see what this provides for us in Sentry, let's trigger that Make Toast error again. In the browser, I'll click Make Toast.

Once again, the error is shown in the console. And if we go check things out in Sentry, I'll give it a few moments to update. And yeah. we see that the issue has fired again, 23 seconds ago.

Alright, let's click into it and see what kind of information we can see about the user. Scrolling down to the bottom, we can see in the user section that the email address has been recorded. Nice. Also, we can click the number under the users label in the top right corner of the page to get a breakdown of which users were affected.

In our case, it's two users. One with the email address we just provided, as well as a user identified by my IP address before we provided the email. Awesome. Finally, if you ever need to clear the user from Sentry, like after a user logs out, you can call the configure scope method and then call set user with a null argument.