blackfireio / php-sdk

The Blackfire PHP SDK
https://blackfire.io
MIT License
150 stars 22 forks source link

Docker blackfire and docker php-probe credentials issue #63

Closed novotnej closed 2 years ago

novotnej commented 2 years ago

Hello! This might be a documentation issue, or a bug, or maybe I just overlooked something, but as far as I can tell, everything is configured as it should be.

I am running a PHP API in docker, with the blackfire php probe configured in Dockerfile. The blackfire agent is configured alongside the API in a docker-compose (below). I am able to see the php extension, as well as logs from the blackfire container, but for whatever reason it doesn't work. I've tried creating a new account with brand new credentials and achieved an identical result.

Any ideas what I might be doing wrong and how to fix it?

image

version: '3.5'

services:
  api_apache:
    ports:
      - 8081:80
    volumes:
      - ./:/var/www/html:cached
      - ./.docker/apache/config/apache.conf:/usr/local/apache2/conf/service.apache.conf:ro
      - ./.docker/apache/config/httpd.conf:/usr/local/apache2/conf/httpd.conf:ro
  blackfire:
    image: blackfire/blackfire:2
    environment:
        # Exposes BLACKFIRE_SERVER_* environment variables from the host
        BLACKFIRE_SERVER_ID: "3df2************************4d6"
        BLACKFIRE_SERVER_TOKEN: "fadb5c0a8***********************c45e88c6"
        BLACKFIRE_CLIENT_ID: "9f5e*************************f685906c"
        BLACKFIRE_CLIENT_TOKEN: "3321**********************************ac62ed"
        BLACKFIRE_LOG_LEVEL: 4
    networks:
      - proxynet
  api_php:
    environment:
      XDEBUG_MODE: "${XDEBUG_MODE}"
      BLACKFIRE_LOG_LEVEL: 4
      BLACKFIRE_SERVER_ID: "3df2************************4d6"
      BLACKFIRE_SERVER_TOKEN: "fadb5c0a8***********************c45e88c6"
      BLACKFIRE_CLIENT_ID: "9f5e*************************f685906c"
      BLACKFIRE_CLIENT_TOKEN: "3321**********************************ac62ed"
    volumes:
      - ./:/var/www/html:cached
      - ./temp/xdebug_out:/tmp/docker-xdebug
      - ./.docker/php/config/php.ini:/usr/local/etc/php/php.ini:ro
shold=10&timespan_threshold_max=100&timespan_threshold_min=1&timespan_threshold_ratio=0.01, expires=1645587426&userId=9f5e4e****************************906c&agentIds=3df24fc***********14d6%2C-%2Crequest-id-e0dd5fc4-d732-44a7-adc9-a1f1b4ddc5e8&profileSlot=00000000-0000-0000-0000-000000000000&collabToken=4d48a426-b491-42fe-826e-79665907bfdd&signature=RWQnQ9p2SlzD8wGXBpbMfXFOh5NK6eHERN7F6zYRcgi75dwdm_XS4U9tU0ilegKX0RYzj82MREOuLtprsI1tfyEqPxZVOIyaDA4=&aggreg_samples=1&flag_cpu=1&flag_fn_args=1&flag_memory=1&flag_nw=1&flag_pdo=1&flag_sessions=1&flag_timespan=1&flag_yml=1&timespan_threshold=10&timespan_threshold_max=100&timespan_threshold_min=1&timespan_threshold_ratio=0.01, expires=1645587426&userId=9f5e4*********************5906c&agentIds=3df24fc***********14d6%2C-%2Crequest-id-78adc903-aa92-4a02-88fe-8715bc71a594&profileSlot=00000000-0000-0000-0000-000000000000&collabToken=4d48a426-b491-42fe-826e-79665907bfdd&signature=RWQnQ9p2SlzD80Ki1UtHfJmw2mL9woIj567VDQznTHejWmkW_FyATAjmNH2MCeteH7G2gO4dHNp9Gq2O5RE_PTuCi7p5sJaw5gw=&aggreg_samples=1&flag_cpu=1&flag_fn_args=1&flag_memory=1&flag_nw=1&flag_pdo=1&flag_sessions=1&flag_timespan=1&flag_yml=1&timespan_threshold=10&timespan_threshold_max=100&timespan_threshold_min=1&timespan_threshold_ratio=0.01]
blackfire_1   | 22/02 15:37:27 DBG Bucket time threshold reached, call flush (3df24fc***********14d6:fadb5)
blackfire_1   | 22/02 15:37:27 DBG Flush 1 bucket's traces (3df24fc***********14d6:fadb5)
blackfire_1   | 22/02 15:37:27 DBG Sending APM request (0 Retry)
blackfire_1   | 22/02 15:37:27 DBG APM bucket found (3df24fc***********14d6:fadb5)
blackfire_1   | 22/02 15:37:27 DBG Sending request POST https://apm.blackfire.io/apm
blackfire_1   | 22/02 15:37:28 ERR Cannot upload APM traces, credentials are invalid (3df24fc***********14d6:fadb5)
blackfire_1   | 22/02 15:37:28 DBG APM bucket found (3df24fc***********14d6:fadb5)
blackfire_1   | 22/02 15:37:28 WRN Ban APM bucket '3df24fc***********14d6:fadb5' until 2022-02-22 15:47:28.0207927 +0000 UTC m=+632.763331401
blackfire_1   | 22/02 15:37:28 DBG Releasing APM request.
lolautruche commented 2 years ago

Hello

Could you please follow-up this discussion to Blackfire support (in the chat window)?