Laravelstream· Jun 18, 2025· 1:25:31

Laravel Worldwide Meetup - Deciphering Laravel Nightwatch

Watch on YouTube ↗

transcript

184 moments
  1. Music

  2. Thank you.

  3. We are live. Welcome to a very special edition of the Laravel Worldwide Meetup. My name is Dan Cipelsa. I'm one of your co-hosts, along with Margaret Tavares. We are thrilled to once again bring you an awesome talk from a member of the Laravel community, highlighting so much of the great stuff going on in the Laravel community. Speaking of my co-host, Margaret, how are you doing today? I'm doing pretty good, Dan. How about yourself? I'm doing well, thank you. We are heading into summer here in Canada. The weather is getting warm. We're getting close to Laracon US. I'm excited about that.

  4. a lot of awesome stuff going on and i'm also very excited about uh today's talk but before we get to today's talk we've got just a little bit of housekeeping to do here so let's have a look at some stuff we have going on cool thanks dan for anyone new welcome anyone returning welcome we want to go through a couple resources in the laravel community that we'd like to bring to your attention so you could also benefit being a parent of the laravel community so first up we have laravel news if you haven't heard about it before it's run by eric barnes so thanks eric

  5. They have a weekly email newsletter and you can sign up for that to receive weekly updates. And they post all about news in Laravel community. And they also have a Laravel News podcast ran by Jake Bennett and Michael Drinda. And they discuss all the latest Laravel releases in the last week. They've had a lot happening this last week. So make sure to check them out at laravellnews.com. Next, we have the Laravel podcast host by Matt Stouffer. So thanks, Matt. For this season, we've noticed that Matt's been having a member from the Laravel team

  6. join on every podcast, so make sure to check them out at laravelpodcast.com. If you are looking to hire some Laravel developers or if you want to post a job for a Laravel job that you have open and really for all your Laravel job needs, you can check out larajobs.com. This month, we wanted to highlight some of the other companies in the community that are also looking for Laravel developers. So if you'd like to take a look, we'll have some more information in the description below about these job posts but on this next slide if you mind switching over and in we have a job scan

  7. give butter insomnia cookies coconut software area 17 and ps salon and spa that are looking for some very talented liberal developers again you can take a look in the description below for more information about what they have what they're looking for up next is lara cast so if you want to learn how to write some laravel big thank you to jeffrey way for running this awesome resource So if you want to build your Laravel skills, make sure to check them out and also learn from Laravel community at laracast.com if you want to learn some Laravel.

  8. Some upcoming events that we got going on, Laravel US that Dan was talking about earlier will be happening at the end of July. So July 29th and 30th. Tickets are still available and that's going to be happening in Denver, Colorado. Dan and I will be there as well. So excited to meet people in person. And that's what we got going on for Laravel US. Next, we have Laravel Live Denmark, which will be happening in August. so August 21st to the 22nd. So you can sign up and find more information at laravellive.dk. We also have a meetup group for any PHP enthusiasts

  9. or Laravel enthusiasts as well. They have a global hybrid community. And so if you want to check them out, you can check them out at meetup.com. Also big thanks to our host vehicle for their support in relaunching this meetup. They have a great team of developers. So if you have any Laravel problems, they'd be very happy to help you out and have a conversation. So make sure to hit them up at vehicle.com or at go at vehicle.com. We're also hosting a giveaway for this meetup. We're going to be closing in next Tuesday because we have another exciting meetup that's happening.

  10. So make sure to scan that QR code to be entered into winning any JetBrains IDE. It's a one-year-long subscription. So we have those going out. So if you want to join, just scan that QR code and you'll be signed up for our giveaway. We'll show the QR code at the end of the stream as well. Awesome. And I'll pass it off to Dan to introduce our awesome speaker foos for this week. Yes. And this brings us to our talk this month.

  11. Today, if you spend any time on the Laravel YouTube channel, you know all about Josh and his awesome videos he puts out kind of highlighting so much of the cool kind of tooling, both inside and outside of the Laravel code base. And we're really the benefactors today of timing that hot off the release of Laravel Nightwatch last night, the latest in the highly anticipated release from the Laravel team.

  12. And we're really benefiting from the timing of that, that Josh is joining us today to kind of, you know, show us some of what Nightwatch is all about, maybe how to get started. So let's go ahead and bring Josh in. Josh, how are you doing today? Hello. Good morning. Good afternoon. Good evening. All of the above to everyone out there. Awesome. Yeah, we were saying we were so fortunate of the way the timing kind of worked out that Nightwatch just kind of dropped last night for us here in North America. And you're here today to kind of show us all about it.

  13. So yeah, this might be the first stream highlighting it at least. So that's what I'm excited. I'm excited for that for sure. Awesome. Well, with with that, I know you've got got some stuff to show us. So yeah, you want to go ahead or anything. You've already shared your screen. So let's add that to the stage. All right. And I will step backstage and it's it's all yours. Josh, excited to see what you have to show us. Awesome. Yeah. Thanks so much for for having me. And I'm excited to talk about Laravel Nightwatch and how we might be able to decipher Laravel Nightwatch together.

  14. Awesome. We'll talk a little bit. Good luck. See you in a bit. Awesome. Good morning. Good afternoon. Good evening. Everyone out there in the comments, I already saw some good evening, good greetings from South Korea, everything like that. So that's awesome. I love it. Thank you so much for being here. I have a couple of slides I want to share with you first, before we get into like actually running into the level night watch, just mostly to set the story, like set the scene for you of what does it mean to monitor errors within

  15. Laravel Nightwatch. What do errors even mean within a Laravel application? Of course, most of us know that, but what does it actually look like? So yeah, I'm here to talk about Laravel Nightwatch. And for those who don't know, deciphering Laravel Nightwatch is kind of like the title of this, I don't know, this talk, this meetup this morning. Well, my morning might be your afternoon, your evening, but getting into that, Laravel Nightwatch launched last night.

  16. um well my last night right it was it was my last night at 5 p.m uh but that was 5 p.m pst uh well i don't know what that means for you specifically but i put a list here of what 5 p.m pst might have meant for all of you and that's all of these things so this is when level night watch

  17. launched last night or last 12 hours, just over 12 hours ago. What is that? 15 hours? I'm never good with math. But yeah, time is kind of like a truth, but it's also a relative. I already see the comments. Good evening from Kigali. Hey, everyone from Bobby. It's 11 a.m. from Marcos.

  18. Hello, everyone from Tongue. Nice to see you here in the chat. But really, Nightwatch is dare to uncover truths about your application. And I guess really that's incorrect too. Because if we're talking about the truth of time, Laravel Nightwatch launched last night for me, but it might have launched yesterday late evening for you or early morning for you. But it's still

  19. this, if I was to take that relative truth and say, okay, it's not about uncovering truth within Laravel Nightwatch because that's not necessarily true. It's about contextualizing truths. So what does it mean to contextualize truths within Laravel Nightwatch? What do I mean by that? I mean, every single time you go to your application, usually if something bad happens,

  20. most of the time you either have to wait for a user to to say hey this happened i wasn't able to do this and usually based off statistics that's only going to happen um every i don't know every i think it's like close to every eight percent of the time a user is actually going to reach out of course that depends on your specific user base if you have developers as your users as laravel does it's probably a little bit higher because we like to tell everyone else when our

  21. errors are actually happening within someone else's application. But Laravel Nightwatch exists to contextualize truths about what is happening behind your application, not just the errors, but also what something means and what you should do about it. Just quick kind of like show of hands in the comments, you can press like one, type in one if you have had or interact with customers on the regular as a developer.

  22. If one in the chat, if you interact with the customers as a developer regularly. Laravel, carbon now, sub hour 15. Exactly. That is when Nightwatch launched. I love it. Okay. So I'm really surprised with this. Okay. Ones. So people interface, a lot of ones in the chat. I love it. Interfacing with customers regularly as developers. That's something that's hard to do.

  23. as someone who kind of didn't really stay in like the developer engineering space, I kind of lived in the customer facing world as a customer support engineer, as a solutions engineer, and now kind of like as a dev rel and support engineer. It's like one of those things where interfacing with customers was my normal occurrence. But the fact of the matter is errors suck. Really, when it comes down to errors within our application,

  24. We know that something bad happened, but what do you do from there? And that's what I think and what I'm hoping to show you this morning or this afternoon, this evening, whatever time it is for you. I already saw Tugishimi from Kigali said a good evening from Kigali. So it's evening for you as well. But errors suck. So what do you do about them? Downtime sucks. What do you do about it? Being on call sucks. What do you do about it? Finding errors suck.

  25. especially if those errors are found by your customers. Fixing things sucks. Waking up early sucks. Maybe that's just me. It's 8 a.m. for me, but this is still kind of early for me. I usually like to wake up at around 8 a.m., but we'll strike that. We'll say waking up early to fix things sucks. How many people, we'll do another, we'll do twos in the chat. How many people in the chat have had to either wake up early or stay up late because you were either on call or

  26. something bad happened in your application and you're like, Hey, I've got to fix this right now. Anyone, anyone out there? Um, I haven't had to do it for specifically for an application, but I have had to do it for like, uh, for like videos and stuff I'm making, um, as well. And I've done it for some of my own projects as well. I'm like, Oh yeah, that is not true. And I've done it on vacation. Um, stay up late on call says Bartel. Um, yeah. So, so many, uh, Joseph says

  27. too in the chat. Yes, it sucks to be able to have to take time out of what you're already doing, or maybe just like your normal workflow and fix things. So what can we do about it? So what? I want to tell you a quick little story. Again, I always, I kind of interface with customers regularly for my job before I was even doing any kind of like engineering type stuff. It was mostly

  28. like, hey, let me help you figure out what is wrong. And usually, there's always an XKCD comic for everything. This might give you enough time to read it as I'm talking in the background. But really, there's sometimes when either a customer just is doing something absolutely horrific and you don't actually know what's going on. And really, it just means that something is just horribly wrong and you'll never actually be able to fix their issues at all. That's a small

  29. occurrence of usual errors and everything like that. But for the most part, when a customer tells you that, hey, I have something wrong with your application, I tried to do this and it's not working, or usually they'll just say this isn't working because we all know that customers suck. Actually, no, sorry, strike that. That is not true. We'll say customers' communication sucks

  30. because it's true most of the time. And especially unless like your customers are very good at communication and those small customers who are, especially you in the chat for Laravel developers, you probably are the fantastic customers who know like, Hey, this is what happened. Here's my stack trace. Here's my console log errors. And this is exactly what happened. Here's how I think you should fix this. And you're a fantastic customer and that's great. But most of us probably interface

  31. with customers who their communication is not as good as it should be. Why? Because they're only dealing with those specific set of truths. Just like we say that, okay, Nightwatch launched last night for you, Nightwatch launched in the morning. But customers don't know the contextualized truths that you might have because your Laravel application is hosted with Nightwatch. So what

  32. can we do about it? So what? So it's not what the error is. It's why the error exists. Men, good night, everyone. Have a good night. So yeah, it's not what the error is. It's why the error exists. And that's really the contextualization part of what Laravel Nightwatch seeks to uncover for you, because it's not good enough just to have all of your errors go into one single place.

  33. you have to know why the error exists in order to know what to do about it. But you have to know why the error exists in order to know why you should do something about it. In this case, should this be something that should be fixed? Because most of the time, especially as developers, we'd like to know, okay, this is the reason why it's happening. This is how I should fix it. But usually we're not seeing the other side of things. Even for most of us who said that we interface with customers here in this call.

  34. at the same time, you probably, it's easier to kind of disassociate that with what they said the error was. And you're like, okay, they're saying this, but really they mean that, you know, this query, they're saying that this is taking a slow time, but really what they mean is I, I messed up this query and it was an M plus one query. And now I have to fix that. Yes, that's true. But why does the error exist and what can we do about it? So let's take a look.

  35. even if we were to take a look at these screens within Laravel Nightwatch, we automatically see from a glance, everything that is happening here. I'll go through these quick so we can kind of jump into the actual, um, actual application, especially if some of you have already gotten time to play around with it. Um, let me know, uh, in the chat, just say yes, if you have gotten to play around or or, um, install Laravel Nightwatch agent into your application or just create an account within

  36. level on that watch. Say yes, if you have as well. But yeah, so even just looking at this dashboard, this is what gives us those contextualized truths. Jackson says, been using it all day. I love it. Awesome. I love it. Because we see something weird happened right here, and then it stopped. Okay, well, we can say that there was some issue probably that was mounting and mounting and mounting within our server, and then something stopped. And so we have all of these, you know,

  37. pinpoints that we can point out even before we know exactly what happened because we know why the error exists. We, or we know that the error exists, but now we can gleam this information from it. We can say, what do I do about it? So why don't we take a look and dive in even further? Okay, let's go. So the first thing I want to point out is for those, so, okay, we have a couple yeses. One I've been using all day. Bartel says, yes, already in staging environment next to prod.

  38. I love it. I love it. I'll just kind of give an overview of how to get started. And then if you have any questions while I'm going through it, feel free to feel free to ask them. I can't promise I'll get to all of them, but I will try my best. Getting started. I already signed up and entered my email. The only thing you'll have to do after entering your email is get a code from your email and put that in. I didn't do that on this stream because I didn't want you to wait for me to

  39. find my code. And I only have one screen, so I didn't want you to see my email either. But we have to create an organization. An organization is attached to a specific plan. In this case, I have a free plan. Laravel Nightwatch has a free plan. You get up to 200,000 events, and we'll talk about what an event is in a little bit. But then the next plan starts at $20 a month. And the good thing is for each of these plans,

  40. You'll be able to also attach, let's see, for the good thing is you'll also be able to attach individual additional events that you might pay. So let's say you did want the pro plan, but you said, okay, every now and then, or maybe just for, I don't want to jump to the business plan, for example, but I do need an extra 200,000 events or something like that.

  41. That is available as kind of these buckets of events in addition to the ones that are included in your plan. So we just have to enter an organization name. I'm going to say that this is, we'll say, Laravel Worldwide. But I'll say Josh's Laravel Worldwide, just so if someone else wanted to take that organization name. Actually, I don't think this has to be unique anyway, so we're good. We'll go ahead and create the organization.

  42. and then I'm going to say that this is a new application. So this is where we can pick the specific storage region. And so this is, where does this information live? It still lives in Nightwatch. It lives in Laravel Nightwatch's infrastructure, but do you want it to live in the United States or in Europe? And there's going to be more regions coming at a later date, but currently this is the ones that exist at launch right now. So United States in Ohio or Europe, Frankfurt. I'm going to pick Ohio because I'm in the United States,

  43. but of course you can pick Europe if your application lives there. And even if you like your application, for example, most of my applications probably live on West coast, just because that's where I'm at. And I do a lot of, uh, us West two stuff. Uh, but a lot of times it's that, that the latency between stuff like that is not going to be noticeable at all. I'm just going to say that this application is, uh, getting started. Perfect. I'm not going to put a

  44. URL, but it's as simple as installing the Nightwatch package. And I'm actually going to do that in my terminal right here. So we'll go ahead and put this out. I'm going to go ahead and go into my, let's go ahead and go into my, this one right here. And I'm going to say, oops, I'm going

  45. to say composer require Laravel Nightwatch. And so it's as simple as installing Laravel Nightwatch. And this is the agent that pushes all this information into Laravel Nightwatch as well. And then we just need to add the token to our environment variables. And so what this is going to do is if I open up my code editor and we're going to go to our environment variables section, I just need to add, and this is all done locally for me right now, but you would do this

  46. in production or wherever that environment is. And Laravel Nightwatch can be used locally if you want. There's nothing stopping you. I've done it. I've used it locally. I would just say, set up your environment so that you know that this is a local environment because it's great to have that testing resources to be able to say, okay, in my test, maybe a browser test, or even just like specific things, is there a specific query that is going longer than I specifically wanted? I'm going to say that's my token. And then I just need to set my log

  47. channel to Nightwatch. So I'm going to go to my log channel. Oops, log channel. And I want to set this to Nightwatch. And so you can either put Nightwatch in the stack as well. So if you had another stack of debug logs or information where those debug logs are going, you can definitely attach Nightwatch to the stack and keep your log channel as a stack. That's almost a preferred

  48. method in most cases as well. But now that we have that, we can set up specific sampling. So this is a big one that I want to make sure you know off the bat because sampling allows you to say how much of my events are being sent to Laravel Nightwatch because let's say you're on

  49. the free plan. You only get 200,000 events, but you blow those through really quick. But maybe for stuff that you just don't necessarily care about. Maybe you don't necessarily care about all of your cues because you, I don't know, you have enough retry methods. You don't necessarily want to blow through your 200,000 events on the free plan or even just your additional paid plans. You don't want to track that information. You want to specifically track maybe just queries or maybe

  50. just exceptions or maybe you just want a specific sampling of all of those. So sampling gives us the ability to say, I only want to take 10%, for example, this is like that 0.1 would be 10%. We recommend starting at 10% for request sampling and adjusting as needed for your application. But it's really up to you of how much sampling of all your data. In this case, only 10% of all events are going to be sent to Laravel Nightwatch.

  51. the cool thing is there is so much additional options as well for in terms of like exception sampling, in terms of event filtering. This is kind of like the thing that I wanted to point out as well. We can ignore specific things. So let's say you didn't want to include mail events because you send 200,000 emails and you're just going to worry about any errors with that maybe like in your

  52. email service provider. Well, we can just include in this .env variable, the night watch ignore mail, or maybe, I don't know, maybe you're an AI application and you're sending a ton of requests to OpenAI or Claude or whatever have you, or OpenRouter or whatever have you. Well, maybe you want to ignore outgoing requests because that's just something that happens so frequently that you don't necessarily want to track it. Again, it's good to track all of these things, but at

  53. the same time, if it's something that maybe isn't as important to you and solving those problems for your customers, then maybe it's something that you can just sample. But if you absolutely want to ignore them, we give you the options as well. But for now, I'm just going to go ahead and just include this sample rate in my .env. And again, this is just a local application. So nothing's really going to happen here, but I just want to show you how this agent actually works. And so

  54. this is a long running agent. And in this case, it can't be run in an ephemeral kind of state. So you can't really run this in like a Lambda or maybe like a Heroku. I don't believe like a Heroku Dino you could run it in, but you have to, you have to run it in a specific long running server. So that way, because it's, it's sending information to Laravel Nightwatch is, is collecting

  55. that information and sending it based off of a specific timeframe or a specific number or specific, sorry, a specific size of requests until it actually batches those and sends them to Laravel Nightwatch. So even just in my testing, if I was to grab this and go into my terminal and say, okay, let's just start the Nightwatch agent. And you can see the authentication was successful. We have the connection successful. We're complete. We're good to go. And it's as

  56. simple as that getting started and getting started is one thing. Yes. But where do you go from here? Because that's really what I want to talk to you about. Getting started is easy. Sending Nightwatch your data is fairly easy. But where do you go from there? And that's really what I want to talk about today. So I'm going to pull up a little demo application that I have here. This one has a ton

  57. of data. So that way I don't have to, uh, I don't have to like fake the data or show you any real data because this is a demo demo application. Um, and I don't want to leak any customers data, but side note, um, you do have the ability to set, um, and we'll get kind of get there in a little bit. But, um, one of the things I always like to show is because Laravel nightwatch is

  58. exists and has that, it is specifically created for Laravel applications, for everything that Laravel application does, handles, sends, and all of the above, it also includes authentication. So we know what specific customer or authenticated user was attached to that particular request. Well, we can kind of go look down here. We'll skip ahead just for a little bit

  59. because we can see 15 users impacted by exceptions. And I have it set for the last seven days. Well, what if you wanted to customize that even more? Because let's say you didn't necessarily want your users' emails. In this case, this is all Laravel emails. So I'm fine with leaking them. I'm sorry to everyone if you get spammed by that, but they're not that hard to find. But for these particular users,

  60. we have the ability to specify what data we are sending to Nightwatch. So you can, all of your data kind of has those two customizations within Laravel Nightwatch. You can sample data and only send a specific subset of all of your events to Laravel Nightwatch. But the second thing is customer information. You can specify what that customer information is. You can find that on our docs as well. But Laravel Nightwatch dashboard at a glance.

  61. The first thing I want to show you is that you see everything from all activity. And you can see here up on the top right, we have selected seven days. We see duration of all things. But this talk is entitled Deciphering Laravel Nightwatch. So what does this all mean? What can you do with it? But what should you learn from it too? The first thing I want to point out is P95.

  62. I'm curious for those in the chat without asking Google or Claude or anything like that. Do you know what P95 is? I did not before starting to demo there on Nightwatch. So I had to look it up. And so P95 basically means all requests in the 95th percentile. A lot of data analysts use this as a specific metric to say,

  63. this is instead of like the average of all requests, it is the average of all requests in the 95th percentile. So that way you're, you're kind of, you're kind of neglecting the very few outliers, whether that's too high or too low. And so that's what P95 means. That's what P95 stands for. And so that's something to note because Laravel Nightwatch does use that

  64. metric. And that is something that I would probably default to is saying, this is a good indicator of what happens to the majority of my users. So we have all of our requests. We have the duration of a specific request. And you can see here, we have this very long timeframe to happen. Of course, when I'm hovering over it, you can see on the actual request, you can see where those requests were. And we can kind of see at a glance how many of those might have been because

  65. of the red. How many of those might have been 500 errors versus 400 errors? And this is all again, all in seven days. But what if we wanted to dive in further? Because this specific thing really stands out to me for the first part. Laravel Nightwatch allows you to kind of click and drag on any one of these specific dashboard items. And you can see then at a closer look without having

  66. to say, okay, this looks like it was June 16th through, uh, or June 15th through June 16th. There's like four hours. I would have to like go in here and maybe do that. And that's too hard. So there will night watch makes it easy. We just drag. And now we're automatically selecting that specific timeframe because then this gives us, if we're wanting to decipher what level night watch means for us in our application, what are we doing? I have a question in the chat. I'm running

  67. into a problem. The agent fails to authenticate with repeated timeouts. Does anyone have the same problem? Interesting. Is that happening locally too? I would try it locally to see if that might be an issue. If it's happening locally, that might be some kind of maybe connection. It's not being able to connect as well. And we might be able to look into it if you reach out to support. You might be able to see any kind of logs as well.

  68. um but yes locally okay i would say um maybe try to reach out to support and we can maybe see what might be happening with that with that request locally it might be uh because you don't have or because that external connection request to try to hit the night watch isn't isn't it isn't happening like maybe your your network is shutting that down um so if we take a look at

  69. this duration, this is where we see a P95. So again, we have this average. This is the average of all of our users. But for the 95th percentile, for the majority of our users, it took 5.1 seconds. That's something that we really should look at. So what actually happened within here? Again, this is saying the request as a whole. This is saying the duration of those requests. But where can we dive in specifically to take a look at that?

  70. And I really want to dive in. Let's go ahead and take a look. Okay, of course, we can maybe start with our users because it's great from most of us who say that we interact with users regularly. We can say, okay, maybe I'll start with a user that reached out to me and I'll see what happened with their particular request. And then I can decipher it from there. But the better option might be to say, okay, this particular route exceeded that threshold in the selected period. I'm just going to click into that route.

  71. and here is where we see that p95 5.11 seconds again we can go ahead and take a look at all p95 and say or greater than or equal to the p95 5.11 seconds and this is where we can see all of those flight requests and you can see http errors this is where we start to decipher what might have been happening in that time but then we also decipher what can we do about it because if i'm taking a

  72. look at this just as a glance, and you might be getting ahead of me already as developers, is if this is happening for all these requests, maybe even if you don't know what's happening within this application, let's say you don't know the inner workings or the inner code, you can decide, okay, an HTTP request returned a status code. Even without clicking into this, I can say, okay, this might have been something that I requested outside of my application. You

  73. would be right because if I was clicking into this, now we have a full exception. And then we have an outgown request. So this is good. So if I can take a look down, we have the full timeline. And this is the part of Laravel Nightwatch that I absolutely love. And I think this is really the part that allows you to decipher so much stuff within your Laravel application because you get the full request.

  74. Most of the time, especially if you're just like logging specific errors, you get this. And that's mostly fine. I mean, especially if you were to like take a look at that and you know exactly what's happening within your code, but you don't necessarily know why it happened, right? You know what happened. You know the results of what happened, but you don't necessarily know why it happened. Ken says that timeline is pretty sick. Yes, I love it.

  75. um it was i was so pumped with a click and drag thing and this time last is the two things i got really pumped when they for when uh i was first shown this from the larryville night watch team um so if i was to drag this and say okay now i see the full request the full 5.1 uh one second request the request the middleware all that looks good the query select to the users um that all

  76. looks good. The controller, that's where it's failing, but it's failing at this outgoing request before we hit this exception. So then I can click into that and see this outgoing request. Of course, we can get a link that's specific to this request in the variable nightwatch, or we can also click in and say, I want to see what happened during these requests. So this is that inner working view of, okay, I'm deciphering what happened because I'm seeing what happened for a specific subset of requests.

  77. But now I'm seeing what happened even in more detail, specifically with the outgoing request that is happening to this flightwatch.io API. And this is what I'm excited for specifically. We'll dive into one of, or each one of these, just briefly for a lot of these things. But this flight, this outgoing request tab allows you to see, and again, you can see here that we're still in that selected timeframe

  78. that we started with at the beginning where we're saying we clicked and dragged and we saw for that, you know, what is this? Maybe like a day and six hours. I don't know what that is. Yeah, like maybe, I don't know, 12 hours. But what happened one day ago within these 705 requests to flightwatch.io? Again, these requests and this duration

  79. is now not only just in this specific timeframe that we initially set, but now it's specifically what we're seeing for all this external API outgoing requests. So this is great because now we can decipher what do we do about this? Okay, well, this API is having a hard time. So maybe we push this outgoing request to a job instead. And maybe then we can have like these retries.

  80. because maybe it's just failing. It didn't exist. So we can see like, let's take a look at the EP95. Yeah, like all of them fail at about five seconds, which makes sense. So maybe like our application has a five second request, external API, like a request limit that's happening within that specific instance of a request. Well, maybe then this is good to say, okay, what do I do with this? Maybe I push this to a background job. And I let the user know that, you know,

  81. the price for this flight is still like being grabbed. Or maybe we push it to a background job and then use Laravel Reverb or something to show that in real-time status to the customer. Because as you can see, all of them failed at five seconds. So what can we do about it? Well, we can probably say that, yeah, this needs to have an additional, instead of just having this be part of the controller itself, because it's happening so frequently or at least so frequently within this timeframe

  82. if I was to clear this out and say the seven days. Okay, P95 across seven days, 2.76 seconds, but we still have those bursts. So maybe it is something that we can push to an external background job with Laravel Reverb, and it's not going to impact our users if it completes a lot faster or if it completes faster for most circumstances.

  83. But at the same time, this might be a way that now we can say, how can I make my application better because I have this data? And you can see here that actually looks like the most of this. We do have a specific job. Yeah, we have an app jobs process flight that's going to this API. So we already have one. But those to put like these this patch request looks like it comes from a job.

  84. But then when we go to, let's see, maybe like the 500 errors, that was, looks like the ones that we had said that would failed, those were coming from the controller. So it's good to know all of this information because it's directly linked to Laravel Nightwatch and directly linked to your Laravel application. You have all this data.

  85. And of course, you could dive into your code and see, OK, when am I actually sending or requesting data from this flightwatch.io slash API, this outgoing request? And what can I change to make this better or not fail as often? Yes, you could do that, but you can also start from this view of saying, okay, I have now received this information. Now I want to be maybe more proactive.

  86. So instead of being reactive within our application, we can now be proactive and say, okay, most outgoing requests, they fail. Maybe the user has to hit refresh and send it again. and maybe most users don't care. And maybe most users probably are not writing in saying, hey, this didn't work. And I tried to, I didn't try to refresh and just didn't work. But there might be some users who just don't come back to your application. And so how can we be proactive when we decipher this information

  87. to make our application better? But I want to go into the requests specifically. So again, we can search for individual routes to say what routes are specifically giving errors. We can say, okay, let's say this destinations route. It's just this simple git route, but for some reason, like we have an enormously large spikes. What might be happening here?

  88. And yeah, an undefined array key of zero. And this is one that you probably would get a, you know, maybe like, of course we get 500 error, that the user would get a 500 error, But this wouldn't be something that you would probably like think through of like, okay, what actually happened here? And of course, then we can say within this exception, we get a cache hit. And within that cache hit is where we have that exception.

  89. So something happened within the cache and within this particular controller to make this error exception of the undefined array key zero happen. Again, we can be proactive with all of this, but we can also be reactive within Laravel Nightwatch. And the biggest way we can be reactive is using particular issues. And so this is just a way to track, hey, is someone checking on these things within Laravel Nightwatch?

  90. It's a very kind of lightweight ability to use issue trackers within Laravel Nightwatch to say, okay, one, maybe I want to subscribe to a particular issue. But then two, you know, maybe let's take a look at issues that are unassigned. And now I can see that because, and we can specifically set up how any kind of requests, like maybe it makes an issue once it's hit a specific threshold.

  91. But once an issue happens, and maybe we can see that unassigned issue, this might be the good starting point. Again, it all depends on how you as an individual user, but also you as a team, want to be proactive versus reactive, or maybe like as good subset of both is a healthy alternative to say, what can I do within Laravel Nightwatch? Well, now I have this particular issue. No one's been assigned to it. I'm going to assign this to Taylor because that's the only time I can

  92. tell him to do anything is here in a demo. But I'll sign it to him and we'll be good to go. And in this case, Taylor would then receive a notification saying that, hey, this issue has been assigned to you and I can also be subscribed to it as well. But now we see these particular occurrences of when in production did the slash destinations route, when did this happen? Like,

  93. and what did it happen? So in this case, it exceeded the 1500 millisecond threshold and that is a threshold that you can set up and that's why this issue was then created. Well, again, this would probably be a good, and maybe this would be a good priority of a low. You know, it's something that exceeded the threshold that I wanted. So this would be a good reactive. If I'm deciphering what Laravel Nightwatch is giving me, it's a good reactive thing to look at. This slash destinations route,

  94. specifically in that request, took 1.71 seconds. Doesn't look like it was the query because that only took 7.11 seconds. But this, okay, yeah, this query. Hmm. We can see here that that took the majority of time, right? Because we see here that this request took 1.71 seconds. But this query right here to select destinations and we get the full SQL query.

  95. And where in the file, where in the controller file it actually exists, which gives us a great head start into fixing this. We can see something is going on with this particular request. to select the destinations, name from the destinations, rejoining the tickets. And maybe this is a simple issue as maybe we don't have an index on our request. I don't necessarily know this code base specifically, but this is us deciphering what Laravel Nightwatch is giving us to then make some changes of like, okay, maybe I do want

  96. to check this particular file controller, this particular controller file and see what happened. But again, this is where we can also be proactive within deciphering this information to be better, to be better, create better applications and have better communication with our users as well. because now, okay, this request took a little bit longer, but maybe I see right here that this happened

  97. from Jeremy Butler. And maybe if I was to take a look at this particular user and we'll kind of go down to, let's see, Jeremy Butler right here. And this person was having a whole bunch of issues, actually, if I was to take a look at like 500 requests, this person was having a whole bunch of issues. So maybe this is a good way to then reach out to them and say, hey, we fixed this issue. Imagine how much better of an application or just a company that you would be or just say whatever project,

  98. whatever kind of users that you service, how could you be better at communicating knowing that you have the information that Nightwatch gives you? Okay, next, I want to take a look at queries itself because we already kind of took a look at some, but this is where most people kind of get excited, especially when you think about N plus one queries. I'll take a look at the chat real quick. does nightwatch automatically flag things as issues or do we as the user need to identify

  99. something as an issue yes so so you kind of have like both ways um so within our settings here we have specific thresholds oh let's go ahead and i am going to jump into it's probably because i'm on a demo application we have specific thresholds so we can say um within like a route for example

  100. if I want to say like, let's have all routes and I want it to be like a 1500 millisecond threshold. When I add that threshold, it's going to automatically create a new, it's going to specify these triggers, create automatic issues and notifications. So then you'll get a notification as well as new issues going to be created. And you can do that for routes, jobs, and these are only on the pro pro plan, unfortunately. Um, but for routes, you have issues automatically created

  101. for you for jobs, commands, and schedule tasks. And those can all be specified as to what that threshold actually is. But then if I was to go back into, uh, my demo application, uh, but then if I was to go into a specific thing, let's say, um, let's do this particular request here. I don't know if this one has an issue attached to it. It does. Let me see if I can find one that doesn't

  102. have an issue attached to it. Let's see. Okay. But there's a, there's the, there's a ability to, I believe to open up an issue within a specific request if there is no issue automatically

  103. attached to it. But usually threshold is probably going to be your better option to be your better, I guess, the starting point, because a lot of times you're not going to be diving into a particular subset or most of the times any threshold or any issue that exceeds a specific threshold is probably going to become an issue anyways. Yes, great question. And yeah, like Dave said, exceptions are automatically turned into issues.

  104. So any exception is going to be automatically turned into an issue, but then you have the threshold of like a route that's longer that can be then turned into an issue as well. So let's go ahead and go to commands. Actually, I was talking about queries. So queries individually are one that I know a lot of people kind of get excited about because it's one of those things that it's very hard to say, okay, how well is this specifically performing?

  105. And this is where you can get into kind of the weeds a little bit. And of course, you can see everything at a glance, like we kind of looked at. This is the past seven days, but we still have the ability to anywhere we see one of these draft graphs to click and drag to see that information again in a very, a little bit more narrow subset. And so we have the ability to see, okay, where are all these specific things happening? This is one, I think we already took a look at that particular issue.

  106. But if I was to take a look at this one, we have select star from flights where date. And this is like the P95 is 400 milliseconds in that timeframe. But if I was to take a look at 14 days, 486, that's not terrible. But it is one, again, that we can take a look at this and say, okay, this matters for your application. because each one of these things, especially within queries, is going to be specific to your individual application. Because maybe some of these queries, if I was to even take a look at

  107. the average and not the P95, maybe 1.49 seconds for the most part is fine for you and your application. But maybe every millisecond counts and that isn't fine. Maybe 465 milliseconds is fine for most applications, but maybe for your application, it's not. And so this is where you can take that information and apply it to your specific use case, to your specific environment, because, and one of the things I love that Laravel Nightwatch gives you is you kind of get to this,

  108. this total call here as well to say, okay, out of 597 calls, this whole request, this whole query took 14 minutes in the last 14 days. So 14 minutes of your user's time was spent within this particular query. And that adds up. And so maybe that is something that you want to start to get a head on, if that makes sense. To start to think of, okay, what actually is happening with this? And again, this might be something

  109. that is the more proactive piece where you're like, hey, we might want to look at this, but it's not something that's necessarily erroring out or that's giving our users any trouble, but we can make our application better. And so we can decipher that information from Laravel Nightwash to say, okay, in all of these requests, and this looks like it's just one controller that's making this request. So yeah, and this just one controller, if I was to shave, you know, an average of 1.49 seconds, even if I was to shave off,

  110. I don't know, 0.49 seconds from this request, imagine the time saved for your users for every single time they hit this request, even in the last 24 hours. It looks like 27 calls and not a terrible amount. But you can see here that we can start getting into these use cases where we're taking this information that Laravel Nightwatch is giving us and we're making our application better because we have all these details,

  111. because we know that, yes, I could make this better and easier for my users. But we also know when something, not just when something bad happens, but we also know what we can do about it later. Hey, Matthias, nice to have you here as well. Notifications. So notifications, and I'll kind of group all these up as well. So notifications, mail, cash, and even jobs and commands, like most of these are going to feel very similar.

  112. Again, each one of these, and you can kind of think of, I told you that I was going to tell you what an event is. Each one of these things in this activity sidebar would be classified as an events. So when you say as a free user or whatever tier you have selected, you get a specific subset of events kind of bundled up in that. Free user gets 200,000 events. So that means anything that happens within your application that is a request, a job, a command, a schedule, a task, an exception,

  113. query, notification, mail, cash, or any outgoing requests would be considered an event. And the good thing, again, because Nightwatch is specifically geared to and tailored for a Laravel application, you know exactly what happened with the new Laravel application. And we know from a Laravel company standpoint that is building Laravel Nightwatch, we know what happened within your Laravel application and what you tried to do or what you wanted to do. And that's why that timeline can be so specific because we know exactly what middleware was hit,

  114. what queries were hit, what controllers were hit. And so that is where you can kind of specify that, okay, maybe you don't have jobs. And so in that case, it's probably not going to matter too much because you're not going to be sending information that you don't have. But maybe like your jobs aren't as mission critical, or maybe like your mail isn't as mission critical, and you don't necessarily want to see that information within your Nightwatch

  115. application or put your 200,000 or whatever bundle of events. You don't necessarily want mail or cash or whatever to be a part of it. And that's where you can decide up to you of like, okay, what specific information do I want to decipher from Laravel Nightwatch to make my application better? And maybe something like that isn't it. But I want to go over this just at a quick glance. Again, mail, I think is really awesome. It's kind of like one of the things where

  116. you can see the subject, the specific mailer, as well as how many people it was sent to and and how long it took. And so this is, again, great stuff to get at a glance, but really also great stuff to do within users. If I was to take a look at, um, like a particular, uh, user, or even just within mail and say, okay, who did I send this flight tickets specific

  117. requests to? Well, I have this process mail flights, and this is the specific, uh, uh, this is the app mail flight tickets and this is the specific like mailer that it was sent to and so a lot of ways like it allows you to then you know make sure that one was the sent but then two it also allows you to see like how long is this particular mail request actually actually

  118. happening did it did it have that attachment associated with it as well and so mail is one of them. Cash is another one that is like very similar, I guess, in a bundle collection when it comes to mail cash notifications, where the cash is going to give you the ability of when did something, when did the event happen within your cash? And what percentage of failures did you,

  119. did you have? So again, this is a very glance view of what is happening there. And then notifications, this is notifications that are happening within your application when it comes to Laravel, specific notifications of you send like a flight created. And again, you get all of this kind of bundled up to say, okay, maybe a user is writing in, or maybe you are being proactive and you're like, Hey, I tried this myself and this took a lot slower. Well, then you have the ability to

  120. dive into a little bit more specifically, or maybe this isn't a local environment or a staging environment and you're working on a new notification. Well, then you have the ability to take this information, to look at it, to see it at a glance, but then also dive in specifically to say, okay, within the last 14 days, these notifications on average, they took around 1.5 seconds. Not too bad. Like maybe, um, and most of these all were mail notifications that we were

  121. sent. So I'm fine with that. Like we, we don't have necessarily anything to glean from that information and then any kind of scheduled tasks. So this is one that is, you have, uh, you know, you see your schedule at a glance, but then you know what is healthy, again, at a glance, and what might be failing. And so these are any kind of artist in command that you might be running at specific schedule time, as well as any kind of jobs or tasks or anything like that.

  122. We can see here when that's going to be run next, as well as being able to click into it and see, again, this is, everything is going to be, whenever we click into, it's automatically going to have the same time frame that we selected the previously. So it's always going to keep that same time frame. This is going to be the last 14 days. We can see the times when it did fail.

  123. We can take a look at that specific information and see, okay, for example, this particular one, P95, it's only failed out of 14 days. It's only failed three times. It might not be something that need to look at but it was a similar integrity constraint violation so maybe that is something that even if it happens regularly it is something that i might want to take a look at

  124. and yeah it looks like it was a particular query that then threw the exception so we were trying to insert into flights and we didn't have any values so and it was because there was a duplicate entry one for key we didn't have any values that we inserted so that that's particular query would be something within that task that we could take a look at and more so just know

  125. exactly what then we might have to, you know, maybe we see this query pop up, this exception pop up within our email notifications from Laravel Nightwatch. And we now know that, okay, maybe a user is going to be reaching out or this is something that I should fix or rerun in order to make sure that this happened properly as well.

  126. And then last, I just want to take a look at the user specifically. We kind of already took a look at this just briefly in the sense that everything we take a look at within Laravel Nightwatch, it's all associated within our Laravel application. We have everything about your request. We have everything about is this a notification versus is this a scheduled event versus is this a mailer?

  127. Because it is a Laravel application, we know what happens when it is a Laravel application. And because you have authenticated users and if you're using Laravel's authentication piece, then we have the ability to say, okay, we want to tie these within individual users so that we know, So yes, let's say Philip looks like has the most requests in the last 14 days. Again, we're taking a look at these 14 days. And we can dive into this a little bit further.

  128. Here's when we have 15 authenticated users in the past 14 days. And those 15 authenticated users did 22,7000 requests. I'm going to dive into this particular subset right here. and let's take a look at the exceptions. So now we can see, again, because we've selected that subset, not only can we look at users, we can go back to that dashboard and I can take a look at how many users were impacted by exceptions in the selected period.

  129. Take a look at the most users that were affected and take a look there. But then we can take this information and say, now that I know that Jess had a whole bunch of issues in this particular time frame well maybe yes something was going on with my application but maybe there is something that I could you know

  130. proactively reach out to Jess and say maybe there is something within you know their network settings or something like that that allows me to better affect better understand what they are doing as a user, or maybe they're trying to do something that I wouldn't expect. And so Nightwatch gives you that glance view. Nightwatch gives you the ability to say, these are the things that happened, but you have to take that one step further to say, okay, this happened, this particular destination

  131. slash destinations issue happened, the undefined array key. We already seen that previously, but this happened specifically for Jess. So can we fix this and then let her know? we probably we probably can so within everything that laterville night watch gives you from that that glance view to be able to take a look at everything individually the whole premise of it is not just to give you say hey oh something's wrong with my application it's to give you an

  132. idea of what might be wrong so that you can better take a look at that and decipher it and say okay this is maybe the reason why it's wrong or this might be something that it looks wrong because again, we have those contextualized truths kind of that we talked about. But now we have the ability to say that, you know, 1.95 seconds for a query, it's not that long, but for my application,

  133. it is. And so we have that contextualized truth within Lightwatch to say this specific threshold, this specific thing, we want to make sure we then do with that information with what we have to be able to make our applications better. Um, Sabi, I did manage to terminate the free trial within one hour. Yeah. It was expensive for large apps. Okay. Um, yeah. And that's one of the things that I was, uh, we, we kind of mentioned at the beginning is you do have 200,000 requests within

  134. free, free requests. So like the one thing that I would, um, kind of look at is specific, um, sampling to say, maybe it's 10% of samplings. Maybe you have to bring that, um, uh, which is what we recommend, but then maybe you also have to say, okay, out of maybe even 10% sampling is too much. And you want to ignore maybe queries or outgoing requests. Again, that's not stuff that

  135. you necessarily want to ignore, but maybe it will help you at least ignore the things that maybe you have a lot too much of that you can go then dive into the more problem things that might come up. So I would take a look at what you might want to ignore first, as well as the sampling to see if that might work for you. But if we took a look, what do you do from this now?

  136. Because taking all these things from Laravel Nightwatch, you have all this at your disposal now. So what do you do with it? The big thing is you shouldn't be afraid of the dark. And that sounds like a catchy slogan, but at the same time, what happens within your application is now contextualized within Laravel Nightwatch. You have this truth of, yeah, Laravel Nightwatch for me shipped last night. For you, it shipped in the morning. Or midnight. For me, it shipped at 5 p.m., which is technically yesterday afternoon.

  137. But that contextualized truth then allows me to say, okay, I don't necessarily need to know why something happened. I just need to know why it happened for this particular user or why it happened for this particular request, this particular controller. So you need to know what happened in order to know what to do next. And that's where you take deciphering Laravel Nightwatch and you take it one step further in order to make great applications. Because that's really what it comes down to at the end of the day.

  138. Taking the information you gleam from Laravel Nightwatch to make your application faster because you now have M plus one queries that are now shown from you at a glance. To make your application better for your users because now you can reach out to them because you know that this particular query, this particular exception was an error for them. And now you can say, hey, I saw that this issue happened for you. imagine what your users would feel if you did that so make great applications with level night watch and you can sign up today um for free to get 200 000 requests uh but yeah thanks so much for uh

  139. for letting me let me chat with you i'll try to look at some of these uh questions as well all right thank you josh uh information presentation beautiful looking slides beautiful looking application so thank you so much for joining and sharing with us and i gotta give kudos to man like uh to be able to give the presentation and have one eye on the chat too which is certainly an expectation and be able to i you know i jot down questions as we go here and

  140. and some of them were in the chat as well and you kind of noticed them and were able to answer them on the fly as well so that was a awesome presentation and uh yeah really excited to dive in and try out nightwash myself so thank you love it um yeah i think uh one of the the questions you know coming into it that i had and i think you you answered a little bit and they kind of showed me with the dashboard there's like, I could see myself hooking, hooking up Nightwatch, starting to run it on application, maybe I've had no profiling or, you know, kind of a in depth

  141. debugging capabilities before, and and I'm gonna let it run for a while. And then what's the next thing I should do, right? At least that dashboard seems to like, that's a pretty good spot where if I land on the dashboard, it's gonna maybe highlight to me, hey, here's some maybe some areas where there might be some fires in your application. And here's where you should, maybe the first thing you you should do in terms of maybe making some improvements. Is that fair to say? Yep, I would say so. So like, again, like the bigger subset of X,

  142. like a timeframe that you can have to be like, okay, I haven't really looked at too much of specific monitoring within my application. Maybe the Nightwatch is the first monitoring tool that you install other than, you know, checking the debug logs every now and then that just get written to Laravel.log or something like that. I would say the first thing, yeah, is taking a look as much as you can. Maybe it's seven days, maybe it's 14 days, but getting all of that information at once is probably best unless there are specific subset of issues

  143. that you know always come up within your customers or within your application. But then this whole dashboard, I think, gives you a great starting point. Usually, I like to think of this whole application piece because you do have this activity and that gives you an idea of, okay, what might be happening within that timeframe. but this application piece is really, I think what it boils down to. So, uh, it's kind of similar to the question that Ken wrote. So if you were handed a layer of op, let's run night watch for three months. What's the first thing you check for stability and the first for speed

  144. slash optimization, optimization. And I would probably check this application, um, kind of dashboard here right now, because one, it gives me the ability to say, okay, what were my trouble routes within a particular timeframe. But two, how important is that to my application right now? Maybe I'm working on a new feature that these routes don't necessarily matter. Or maybe this

  145. is like the majority because for this application, this demo application slash flights slash ID is probably the majority of my application. And because this many exceptions report in the last 14 days that have impacted 15 users. I'm a big person in seeing not just, okay, these happen, but what's the damage? What happened within this? I think this is the first thing I would take a

  146. look at is what routes or what subset of my application is actually having these errors so that I can then kind of work backwards to say, maybe kind of like what we had, take a look at the very beginning. It's like maybe this slash fight slash ID, maybe this should be my next feature in the sense of pushing this to more of a WebSocket approach because I'm taking too

  147. long at pushing these external APIs. So seeing everything at a glance is great, but then it's also, I think, seeing how many users it's impacted as well. Now, if you don't have authenticated user and it's more of like an unauthenticated application, then I think it would be great to look at like the number of requests in collaboration with what, uh, like how long those requests were taking on average as well. That's great advice. Yeah. That's awesome.

  148. I really, sorry to tackle a lot of the things that Dan was saying about your talk. I thought it was super awesome. Being able to see everything in one place just gives you the whole, I don't know, to understand the app better. I mean, you want to make better code. This is another layer that would really help with that. So this is, I think this is super awesome. And then your last line as well, you got to know what happened to know what to do next. I feel like that's a core thing. Like, how do you know what you don't know? So I think it was super awesome.

  149. And then I wanted to touch a little bit on, I know we were talking before this meetup, before the, right up before the meetup, that you had a bunch of other content on the Laravel YouTube channel talking about the differences between telescope and pulse. And I know Devin asked something and Dave responded in the chat, but I guess, was there anything else that you wanted to add about, I guess the difference between nightwatch and the other tools that exist? Yeah, yeah, definitely. So yeah, like, like Dave mentioned, Devin,

  150. there are actually two videos on the Laravel YouTube channel. I don't, I don't believe they're actually published yet officially because there's just unlisted, but if you go to, I'll have to double check on that if they are specifically published yet or not. I saw a lot of stuff on there. I think they're on there. Okay, well, they're published. We're good. I couldn't remember if Chris had done that yet. But yeah, so the big difference to think of is they all serve different purposes, I think. I think someone could technically use

  151. Laravel Nightwatch, Pulse, and Telescope in collaboration. I think Telescope, just from a brief answer to this, Telescope is kind of like geared towards local optimization. And so maybe you don't want to run Nightwatch locally because you don't want to eat up into your 200,000 events or anything like that. And so Telescope is a great option. Um, Laravel nightwatch is basically telescope on steroids for production. And so I think that's kind of like the next step up for production as well.

  152. And most of the time we don't recommend from a Laravel standpoint to run telescope on production, just because you're gathering so much information. Um, it could bog down your server in a lot of ways for pulse, uh, pulses kind of gives you that bird's eye view without giving you those individual details. So again, pulse is great for that. maybe um i i like the idea of pulse like specifically for like dashboard overview where you're like hey we have this page on our website or maybe like there's a tv in your office and

  153. you're like hey everything's good with my application night watch is might still be great for that but you wouldn't necessarily you know want to see all these like red graphs and lines it's great to see hey all my users are going good and because pulse can be customizable within the dashboard where currently night watch is not night watch dashboards just exist how it exists and so I think having that be a good bird's eye view for Pulse is a great option as well. Cool, thanks Josh. Yeah, for anyone watching, make sure to check out those videos as

  154. they're now on the Laravel channel. So cool, thank you. Yeah, this is, I mean, obviously day one for the release and I think I was saying to you too, Josh, that I don't envy the job, the expectations that are on the Laravel team's shoulders anytime it releases these days, right? Because I think, some other SaaS apps that are popular now, they were not popular at the start. And the user base grew slowly, whereas anytime I think Laravel releases a new product, now there's a bunch of us developers

  155. champing or chomping at the bit to try it out and probably try and break it in some ways, right? And I'm sure a lot of people are going to have their own opinions in terms of features they'd like to see and feature requests and things like that. And I'm sure the Laravel team has a lot of plans for future features. There was one specific question here in the chat, about any plans for replays but i think i have a general question too just uh if i was wondering what uh features might be added in the future uh do you have any insight into when i might hear

  156. more about some of that stuff yeah i know that there's still going to be a lot released um at laracon us in terms of uh you know the future plans for night watch but i i guarantee in terms of like replay stuff like that um replays javascript stuff it's stuff that the laravel night watch team um are definitely aware of i can't i can't necessarily uh say one way that not because I'm hiding it, because I generally don't know, but I can't necessarily say when all that stuff is happening,

  157. but stuff that there's so much that they are not only working on, aware of, but also want to make Nightwatch better. And that's one of the reasons why I know some people might have seen that Taylor had tweeted last week that Nightwatch was going to be released this week instead of last week, mostly because the Nightwatch team wanted to make sure those little things uh got became better and so like that that's the whole goal of the watch team

  158. is to make you know monitoring a layer of application from start to finish so much better and so the other i know that um there are so many things on the docket when it comes to um you know replays the front end all that kind of stuff but currently uh it's just the uh underlying anything server related events and requests for for laravel yeah and i think there's uh one thing you said your one slide at the start there the users suck no user communication sucks which i think

  159. yeah without the users we would all be nothing in many senses right exactly i think an opportunity for all of us here to be you know to be those good communicating users right if we run into any issues with the platform initially or we have you know ideas for features i'm sure uh the level team would be happy to field suggestions if nothing else right so definitely definitely yeah and i i do the same thing as well like i so i don't work on the night watch team i just am a a huge fan of nightwatch um and i can run the code base locally uh but yeah i do the same thing as

  160. you the users uh so like if you do have suggestions feel free to like write them into support or if anything like comes up like we're happy to to field those uh but i do the same thing as well where it's like hey this would be really cool if this would this happen this way um instead of another way or something like that and so it's it's been awesome to have the nightwatch team one it's phenomenally designed and it's incredible but then two they're very receptive to those kind of ideas as well and the fact of how much has changed just in the last week since I demoed it

  161. in London a week ago is crazy yeah fast moving stuff going on another question so from Harris who's going to be a speaker next month he's asking is there any way to see all unique exceptions coming in in order to avoid getting sampled and lose track of some of those exceptions okay um anyway to see all unique exceptions coming in or to avoid getting sampled and

  162. lose tracks okay so like sampling 10 of things but you want to see all exceptions and sampling 10 of everything else i think is what the question is kind of saying i don't believe that is doable currently but it is something that the level night watch team is actively working on um and I wouldn't be surprised if it, if it, if it happens sooner rather than later, um, in a lot

  163. of ways. So currently sampling, um, and, uh, I'll, um, I'll defer to the docs just to make sure if, uh, if I'm saying this, anything, anything wrong right now, but I think currently sampling, um, um, uh, let me look at the docs right now, just to be sure you can, uh, you can combine exception sampling with other sampling types. So when you set both request sampling and except exception

  164. sampling. Okay. So that is true. So you can, you can set exception sampling as well as, um, as well as the request sampling. So let's say you set request sampling to, uh, 10% and exception sampling to 50% or maybe even a hundred percent. It will capture all the exceptions from the sampled request, but then it will also capture, uh, 50 or 10% or 50% of exceptions from the non-sampled requests as well.

  165. So there is ways to then only capture sampling of specific requests, everything else, like the mail notifications, events, et cetera, while also capturing all exceptions. So I would defer to the docs. And I'm not logged into the chat, so I unfortunately can't put it. Another very impressive on the fly response there, Josh. Yeah, if you go to the docs and you click on sampling under Nightwatch Agent,

  166. there's some exception sampling information that's incredibly helpful. Cool. Yeah. Cause I could, I could see it at different times. You may want to adjust those, those ratios, depending on what your application's doing. Right. Yeah, exactly. I'm sampling on, on your jobs. If you know that the cues are having an issue at a given time or something like that. Right. So awesome. There was an, an, a question from a little earlier in the chat, I think when you were kind of showing a setup initially, and just a kind of conceptual question to you,

  167. Ushimi asks, do you have to keep that artisan agent command running? Yep. So this is a longstanding command. So this is basically what, and kind of, this is a gross oversimplification of what happens behind the scenes. But basically what happens behind the scenes within this Nightwatch agent is Nightwatch bundles all of your requests together until a specific timeframe. I believe it's 10 seconds or a specific limit. In this case, like a megabyte limit. I forget what that number specifically is.

  168. once that has either been hit or the timeframe of 10 seconds has been hit for your, and it might only be two seconds. I can't remember the specific numbers, but once those have been hit, then it sends and bundles all of those requests and sends them to Laravel Nightwatch. So that agent command does need to be long running because what it is doing is kind of bundling all those together and then sending them to your Laravel Nightwatch dashboard. So that

  169. needs to be in a long running daemon or like a server full environment and that kind of connects to another question i had which i already saw in the documentation but if i'm already a forge user or i'm using a cloud those things are probably going to be pretty easy for me to set up right yep laravel forge and laravel cloud are um are um there we have guides on them in our documentation but they are supported um out of the box from day one it's pretty easy just to like within

  170. Laravel Cloud, you create a background, like a custom worker as a background process, and you just run that PHP Artisan Nightwatch agent command. Technically, the cool thing within Laravel Cloud, and I believe the same thing within Laravel Forge, is you wouldn't even have to do any of this install for your nightwatch process locally. You could technically do it all within your web UI because you just have to compose a require. You then have to set your environment variable, and then you can run the PHPRs in Nightwatch agent command.

  171. Oh, thank you. Cool. Josh, just also wanted to check in on time with you. Do you have time for like maybe one or two more questions? Yep. I'm good. Okay, cool, cool. I know we have a security talk. It's coming up next week. So in regards to security, is Nightwatch able to monitor background jobs, queues, and scheduled tasks out of the... Oh, sorry. That's not my security question. I got another security question. Well, maybe we'll answer that one first. Is it able to monitor background jobs, queues, and scheduled tasks out of the box? Yep. So Nightwatch is able to monitor any kind of like background job.

  172. And that's one of the, each one of those is kind of one of the events. So you have any background jobs, schedule a task, which you have the ability to see when did it last run? Was it successful when it ran? And then any kind of, what was the last one? Commands? Yeah, schedule tasks out of the box. Yep. So you have all those are set out of the box. The only difference between like the free plan and the pro plan is if you want to set specific thresholds that aren't necessarily thrown exceptions for creating

  173. issues. So let's say you did want to be notified if a scheduled job takes longer than you want it to take, that threshold would then have to be set if you're on the program. Okay, cool. Thank you. And then, sorry, going back on security, wanted something on the list here. What security measures are in place for the real-time data being

  174. collected and transmitted by Nightwatch? Yeah, so it's basically everything that is being sent, like as requested and sent from your Nightwatch, from your live application. The only thing that you have to be aware of is the user information that you're sending. So yes, anything that is being sent from your application in terms of like, you know, like you're sending this

  175. outgoing API, API requests, that whole entirety of the event is then sent to Laravel Nightwatch. And so I like in security wise, I don't think there's anything to be concerned about with that. The only thing I would want to point out and be aware of is when it comes to like any kind of like HIPAA violation in terms of like what you maybe have set with your particular users of what you want to capture.

  176. By default, it captures name and email, but you can specify what actually gets sent to Nightwatch for those users' requests. And you did show, too, that there's a couple of regions supported, and I think you mentioned more to follow. So that might also be part of the consideration as to where that data is being stored as well. Yeah, exactly. That's a good point, Dan. Thanks so much. Yeah, EU and US are currently the two regions supported. But yes, that's something to think about as well as where is that information being stored?

  177. Absolutely. All right. Anything else on your side there, Margaret? Questions? I think those are the ones that I got logged here. If there's any other ones that come through the chat or whatnot, I'm sure Josh, I can forward them up to you. And then the Laravel team will address them as well. But yeah, I think with the current launch, there's a lot of questions being brought up. So yeah, I've kind of seen all the ones here so far. So I'm good. Good. I know there was some live debugging in there with Mo a little earlier, trying to set up his agent. And I see another question

  178. sort of in the sort of the support kind of vein. So there is support as well. I think that people should reach out to if they have any questions or issues initially to get going as well. Awesome. Well, thank you once again, Josh, for joining us. Of course. Yeah, thank you. Awesome presentation. Lots of information there. I think everyone's really excited about Larable Nightwatch and the features to follow in the coming months. So thanks for sharing with us today. We'll talk to you soon. Thank you. Thanks for everyone in the chat for joining. I appreciate it. All right. Take care, Josh.

  179. All right. And with that, we've got just a couple of items here to close out the stream for today. Margaret, I'll hand it off to you. Cool. Thanks so much, Dan. And thanks so much again to Josh Siri for doing this presentation. For our next meetup, you can join us next week. We have two going on this month. So you can join us on Tuesday, June 24th at 9 a.m. EDT. We're going to have Stephen Rees-Carter from Australia joining us. So thank you for the time adjustment. So as well with what we got going on,

  180. on to give back. We have a giveaway as well. So it's going to be open until next Tuesday. So if you'd like to join and win any JetBrains IDE for an entire year subscription paid for, you can just scan that QR code and enter our draw and the winner will be announced by email on June 24th. Let's do that for a moment. Cool. Some ways to stay connected with us. You can join us on X by following us at Laravel www meetup we'll give out all of our updates about the upcoming meetups so stay tuned and

  181. give us a follow if you'd like and then we're also on blue sky so if you'd like to follow us on blue sky you can give us a follow at laravel www.vsky.social and to stay up to date with emails you can join us on the official of the official laravel worldwide meetup site at meetup.laravelle.com and you can enter your email for updates there. And of course, thanks for catching us on YouTube. You can check us out on the Laravel official YouTube channel,

  182. Laravel PHP. Make sure to subscribe to figure out, to stay up to date with what's going on. And we'd appreciate any support. So thank you so much. Head over there and check out all the great content being put out from the Laravel team, including a bunch of videos by Josh introducing us all to Nightwash. And with that, I think that kind of ends things for this week. So once again, thank you, Josh, for joining us and sharing all things Laravel Nightwatch. We're all excited to get going with the platform. Anything from you, Margaret, before we sign off for today?

  183. Thanks for joining us and always happy to run these meetups. Super awesome to be involved in the community. And thanks for tuning in. Yeah, and excited to join you in just one week's time. So we'll see you next week on the next one. Have a great day, everybody. Have a good one.

  184. Thank you.

just you here