Stratus Guides - Blackfire.io
Blackfire.io is a paid PHP profiling tool. Unlike XDebug, it can be left on without impacting site performance. It is also considered easier to use than XDebug for performance checks. However, it cannot act as powerful a debugger as XDebug.
NOTE: XDebug and Blackfire can never be used together.
- Log into a Blackfire.io account.
- Set up an environment or profile to obtain a Server ID and Server Token. To get started, first make sure you have an account with Blackfire.io. Set up an environment or profile so that you have a Server ID and Server Token.
- Go to the [PHP > Blackfire][2] Admin panel.
- Enter the information as indicated.
Using the Chrome or Firefox browser extensions, start profiling the Webscale STRATUS site direct from a browser.
Update Varnish
In order for Blackfire to run with Varnish (if enabled), the following code needs to be added to Varnish VCL inside the sub vcl_rcv function:
if (req.esi_level > 0) {
# ESI request should not be included in the profile.
# Instead you should profile them separately, each one
# in their dedicated profile.
# Removing the Blackfire header avoids to trigger the profiling.
# Not returning let it go trough your usual workflow as a regular
# ESI request without distinction.
unset req.http.X-Blackfire-Query;
}
# If it's a Blackfire query and the client is authorized
# just pass directly to the application.
if (req.http.X-Blackfire-Query) {
return (pass);
}
Feedback
Was this page helpful?
Glad to hear it! Have any more feedback? Please share it here.
Sorry to hear that. Have any more feedback? Please share it here.
Last modified January 1, 0001