Also, just kind of in general, in our philosophy and how we build software, so again, I mentioned that we're open source, so we really are like built by developers for developers with developers, essentially. Okay, I'm going to finish up one last thing. This is the custom tags, and again, this can be very useful for when you have a lot of issues, like was mentioned in the chat, and you are working on trying to be able to filter through those issues in ways that are effective. Also, someone mentioned console.log is powerful, but not secure, because you don't want to reveal too much information in your console.log, so you don't want to be able to share things like user IDs, and things like that. So that is another reason, yes. Resolved error by itself so that it gets easier. Yeah, AI, that would be nice. And I think that they're... You know, it's very tricky, we're not going to dive into the question of like AI versus not necessarily right now. But yeah, that is a way. Okay, so now what we're going to do is, we're going to add in custom tags. So there are a few operations that are happening, we can update, we can remove and we can create a new. I'm not gonna go into the creating a new, but let's go ahead and talk about how we might want to set a tag for updating or removing a flashcard. So when we want to update, so here we're in the handle update function. So right down here, we're going to add in, this Century.setTag for update. So we're saying the operation that we're trying to complete is updating and we're going to do the same thing over here on the remove. So we'll go ahead and set this to remove. We wanted to, we can also add in a create one, but we're not going to, that would be over here and just kind of this handle create, but we're not going to worry about that right this second. Okay, so this will again, just kind of add additional information to make it easier for you to filter through different areas that you have in the Sentry dashboard and see those playing out. So let's go ahead and PNPMBuild. Yes, that's a great question to Sentry. Is Sentry going to, or does it already focus on visual or user experience? Like if a use effect is running five times and making something like flash on the screen. And Lazar responded, which is very interesting. I'm really excited about this. This is a user reporting widget. So basically allowing you to have something attached to your page or app that users can report something that isn't incorrect in code but is an error or an issue for users and their experience. And then those will show up just like the more code-based issues and errors in Sentry. But, and be similarly filterable in all of that. But yes, it will be a user initiated action unless we wanna use AI to run it over and over again. Okay, I started getting distracted by chat, go ahead and refresh this. I'm just gonna refresh another time and I'm gonna go ahead and go into what is a type guard? Okay, got an issue. Okay, I think it showed up already. Did it show up? Yes, okay, cool. And then here what we will see is if we maybe refresh again, 32, oh, wait, was this the same one? This was the same one, wasn't it? Okay, let me go back. So the usefulness of custom tags is particularly in the search, so you can search for operation is, what did we say, update, right? Which it hasn't triggered it yet, so just refresh again. Well, here it is, so operation update. So this is only showing the errors that are unresolved where the operation was update, and you can see if we remove this one, then all of the errors show up. If we open this one up where we did add the operation, then the tag also will show up here. Right here, so operation update. And if we scroll back through the previous events, you can see those ones don't have that tag, so it'll only update to the tags that are associated with those particular events. And again, this is particularly useful for if you have a custom tag and then you need to share it, or sorry, you need to filter by that particular tag.
Okay, so the first thing that we'll do Okay. So real quick, pretty much what we've done is set up Sentry by using the wizard, one line of code, and it got everything working for us. We built, we tried it out, we created an error, we saw it, we made sure source maps were actually uploaded the second time around. It would have been uploaded the first time had I not deleted the Sentry Cli RC file. So we make sure that it's updated, we run it again, and saw that now we were able to see a stack trace. Then we applied, or sorry, we added event context, specifically the user's email address, and custom tags, specifically which operation we were trying to accomplish, when the error happened and noticed that the errors inside of Sentry, the specific events, have that additional information if it was added after the fact.
Okay, we're gonna take a short break, about five minutes, so 9 0 8, if you are in Pacific time, which none of you are. So five minutes, eight minutes past the hour, how about we just say that. Feel free to continue to ask questions here, I'm gonna stop sharing my screen. And Lazar is gonna get set up with his, yeah, one benefit of Sentry also specifically that it's open source is that we do have a ton of integrations in general. And some of those are by us, some of those are in partnership with us, and some of those are just because we're open source and people can make them. Yeah, and you can do alerting in kind of Slack, Discord, Teams, et cetera, but you can also do integrations with like Jira and GitHub and Asana, if you use those for project management more. Okay, I'm gonna pass it off to Lazar and I'm gonna fill up my water. There you go.
Alright, let's begin. So, as Sarah mentioned, we're gonna do three more lessons until the end of this workshop. So the first one is we're gonna set up alerts and issue assignments. Then we're gonna do some distributed tracing. We're gonna explore what are like the benefits of distributed tracing and how to set up distributed tracing in Next.js. Then at the end, we're gonna do a quick run on Session Replay. What can we get out of Session Replay? And like, how can Session Replay help us debug faster, et cetera? So yeah, let's check it out. Alerts and issue assignments. We're gonna do issue assignments first. So, Sarah showcased a bunch of errors. Alright, so we can see how errors look like, what is the data that we're getting, like all of the data, but who's going to solve this problem? Who's gonna solve this issue? Is it me or Sarah? We can get in and I don't know, roll the dice, play some sprint poker, try to figure out who has more bandwidth to fix this issue. And if this is something that I caused, for example, my part of the code, as you can see, the error is in Hook slash Flashcards. So someone created the flashcards React Hook. What if that was me and Sarah got tasked to fix the error? She's either going to struggle because that's not her code. So she's gonna need more time to read and understand what I wrote.
Comments