Profiling with Blackfire 0:00Let's take a look at how you can make use of services like Blackfire.io and Papertrail on your Laravel Forge server. So if you do not know what Blackfire is, it is a service that allows you to remotely profile your application. So if I go to Blackfire, I already registered here, I can see two example profiles. So let's take a look at one of them. And this will be one of the outputs that you receive when you profile an application. So basically you see the stack trace in a visual representation, and you can zoom in and go into each function call and see how much time the application spends on which method. Installing Blackfire on Forge 0:42and go into each function call and see how much time the application spends on which method. So this is really helpful when you debug a time-consuming task or some memory-consuming application and want to know what's going on under the hood. So Laravel Forge makes the integration of Blackfire on your own server very easy. To do this, all we need to do is go to the monitoring tab on our server and enter the Blackfire server ID and server token. So if I go to my profile, to the settings, and credentials, I here have a server ID and a server token. So let's copy them, and let Forge install Blackfire. Profiling via Browser Client 1:32a server token. So let's copy them, and let Forge install Blackfire. Okay, so now Blackfire is installed on our server. And in addition to the server part, we also need something on our computer as a client to interact with the server. So to set up, to profile a specific part of our application. For this I installed a Chrome extension from Blackfire, as you can see here. And to give this a try, I can just go to our website, open the Chrome extension, and since we installed Blackfire on the server, I can just click on Profile, and now take a look at the call graph. Centralized Logging with Papertrail 2:23we installed Blackfire on the server, I can just click on Profile, and now take a look at the call graph. And this would be the call graph for the demo application that you just saw. And now I can take a look at what is consuming how much time, we see the bootstrapping of the Laravel kernel, etc. So this really helps when you want to debug your application. The other thing I want to show you is a service called Papertrail. Now this service provides you with an interface where you can see all your logging information. So if you log something in your Laravel application, these logs will end up on this server. And this makes it especially useful when you're working with a team of multiple developers Configuring Papertrail on Server 3:11So if you log something in your Laravel application, these logs will end up on this server. And this makes it especially useful when you're working with a team of multiple developers and you want to have one place with all the log files. And you can also search through the logs, which makes it a lot easier to find certain things, rather than having to look through log files on the file system. So I already signed up at Papertrail, and here I get a URL with a port, and all I need to do is copy this and set it up with my server. And install Papertrail. Now to try this out, I added a simple route to my demo application that's just called log, and it logs three different pieces of information. Testing Logs in Papertrail 3:59Now to try this out, I added a simple route to my demo application that's just called log, and it logs three different pieces of information. So one info, one warning, and one error log. So if we now go to Papertrail, and take a look at our dashboard, we see the server here. And if we take a look at it, we can now see all the log information from our server. So if I now go and open my application, and go to the log route, I see three new entries for the log, the warning, and the error information that I just logged. So this is how you can use BlackfireIO to profile your application at runtime, and Papertrail if you want to have a unified space where you can send all your log files to.if you want to have a unified space where you can send all your log files to.