Skip to content
This repository has been archived by the owner on Dec 1, 2018. It is now read-only.

Latest commit

 

History

History
45 lines (33 loc) · 1.64 KB

blackfire.md

File metadata and controls

45 lines (33 loc) · 1.64 KB

Using Blackfire profiler

Setup

  1. Register with https://blackfire.io.

  2. Add blackfire service in docker-compose.yml and configure API keys:

    Option 1: Use Blackfire Docker instructions to get a snippet that you can put in a .bash_rc/etc. file globally. Uncomment respective lines in docker-compose.yml.

    Option 2: Grab server API keys from your profile page. Uncomment respective lines in docker-compose.yml and replace Server ID and Server Token with your API keys.

    blackfire:
      image: blackfire/blackfire
      environment:
        # Option 1: exposes host's BLACKFIRE_SERVER_ID and TOKEN environment variables.
        #- BLACKFIRE_SERVER_ID
        #- BLACKFIRE_SERVER_TOKEN
        # Option 2: use global environment credentials.
        #- BLACKFIRE_SERVER_ID=<Server ID>
        #- BLACKFIRE_SERVER_TOKEN=<Server Token>
        # Log verbosity level (4: debug, 3: info, 2: warning, 1: error).
        #- BLACKFIRE_LOG_LEVEL=4
  3. For docker-compose.yml files using version 1:

    Note: if you do not see version: 2 in the beginning of your docker-compose.yml file, then proceed. Add a link in the cli service definition:

    ...
    links:
      ...
      - blackfire
    ...
  4. Apply new configuration with dsh up

  5. Follow instruction to install and use blackfire via a Chrome extension.

See blackfire.io for more docs on using blackfire including support for other browsers.