fertter.blogg.se

Blackfire laravel
Blackfire laravel













That's why every Laravel Vapor Lambda deploys with a PHP layer that contains the necessary binaries and configuration options to execute your PHP code. Every layer adds some additional code, libraries or runtimes on top of your Lambda's source code.Ĭompared to a more traditional Lambda that uses the built-in NodeJS runtime, PHP isn't one of the default Lambda runtimes. It's like Shrek once said: "Lambdas are like onions.

blackfire laravel

This will come in handy for getting Blackfire to work on Lambda. This is important because the agent doesn't necessarily run on the same machine as the PHP probe. This configures how the PHP probe can communicate with the Blackfire agent. That's why its most important configuration option is the BLACKFIRE_AGENT_SOCKET value. It will read profiling data from the PHP process and send it to the Blackfire agent. The PHP probe is nothing more than a PHP extension. It reads profiling data from a unix socket or TCP address, does some processing and then sends the data off to our Blackfire account using the configured server ID and token. I like to think of the agent as a proxy service to Blackfire's APIs. the Blackfire PHP extension or "PHP probe".

blackfire laravel

If you've ever installed Blackfire on a more traditional server (or even locally) you'll know that there are two important moving parts: In the second part of this post we'll add the two together to get production profiling data from Lambda into Blackfire. In this blogpost we'll take a quick look at how Blackfire is set-up and how Lambda layers works. Xdebug is probably one of the most wide-spread solutions but for Flare we chose to use Blackfire as it features an easy solution to get production profiling data without being too disruptive. There are a couple of interesting PHP profilers out there that can help us to to so.

blackfire laravel

However, now more than ever it's important to keep the reporting endpoint performant. Our base approach here is "store first, process later" (later meaning just seconds later on a async queue). Over at Flare we're dealing with a lot of traffic on just one endpoint backed by AWS Lambda.















Blackfire laravel