1. 云栖社区>
  2. PHP教程>
  3. 正文

Using Blackfire for debugging production environments | Symfony Finland

作者:用户 来源:互联网 时间:2017-12-01 15:35:33

Using Blackfire for debugging production environments | Symfony Finland - 摘要: 本文讲的是Using Blackfire for debugging production environments | Symfony Finland, So as you can read the data is collected from your servers and analysed via an online SaaS tool. Initialising a request

So as you can read the data is collected from your servers and analysed via an online SaaS tool. Initialising a request for a view to be debugged is done using a browser extension or a command line tool. The final profiling data is shown on a separate web application.

The above process gives you a convenient way to get insight into how the application at hand is functioning in production and spotting bottlenecks. You can also compare two created profiles to see which parts of the application have been improved or degraded.

Learn how to get startedand how to analyse your first profileat blackfire.io.

Pro-tip: If you're running Varnish in front of your application, a practical method for debugging that application is opening up an SSH pipe directly to the underlying web server such as H2O, Apache or Nginx.

Pricing, dependency and privacy concerns

As you might expect, the product uses a freemium model and on the free SaaS subscription level you get full profiling capabilities for Web Pages, CLI Scripts and API Calls. Limitations kick in when you want to create teams, use test assertions or hold your test profile for a long period of time (free tier caps this at one day). Read more about the pricing of Blackfire.

Creating a hard dependency to a tool in the daily life of a companies activities such as Slack for communitiesis a thing to consider for businesses. An absolute dependency to Blackfire is impossible as it is only an additional tool for developers to use. You are of course, free to keep using competing products such as Tideways, Xdebugor xhprof.

As with all subscription service software, pricing may shoot up to a level where it no longer makes sense at a large scale. The trend of developers buying their own software ( Buy Your Own Software, BYOS) in companies that are so entrenched in Open Source that they do not want to pay for software, might make Blackfire and other tools common place even if the company does not purchase subscriptions.

Another valid concern is Data Privacy. If you're giving out application data from production enviromnents, what is the guarantee of not sending over sensitive data such as Credit Cards information? The Blackfire team has considered:

When the data are ready, the agent send them back to Blackfire servers. So, what are we getting on our side? Function call names, times, memory, anonymized SQL queries and HTTP calls (only for the Enterprise Edition), and some metadata like the full HTTP request (URL and headers) for web profiles, or the CLI command for console apps. Nothing that could potentially be used to harm you.

Read more about data privacy and inspecting sent traffic on the Blackfire Blog: Data Privacy and Blackfire

Beyond PHP

Blackfire is currently a PHP only products, which is a clear choice since PHP powers vast parts of the web with tools such as Symfony, Drupal and WordPress:

Improving Wordpress Translation Performance Boosting performance of a complex Drupal 7 project with Blackfire.io View Blackfire in action with Symfony on Platform.sh

Blackfire is a product from SensioLabs, a company tightly linked with Symfony and PHP, it is worth mentioning that Blackfire is not limited to PHP, but will be usable with Python and JavaScript in the near future. The platform itself is written in Go, PHP and JavaScript.

Blackfire is also able to process profiles generated with XHProf, Xdebug and Google Chrome CPU, making it a universal data processing tool instead of a PHP debugger. It won't replace things such as React Developer Toolbar, but it does open up interesting prospects in lower lever profiling such as Visualizing Google Chrome JavaScript CPU profiles.

以上是云栖社区小编为您精心准备的的内容,在云栖社区的博客、问答、公众号、人物、课程等栏目也有的相关内容,欢迎继续使用右上角搜索按钮进行搜索,以便于您获取更多的相关知识。