DataDog / dd-trace-php

Datadog PHP Clients
https://docs.datadoghq.com/tracing/setup/php
Other
485 stars 151 forks source link

[BUG] Extension fails to install #1501

Open phumberdroz opened 2 years ago

phumberdroz commented 2 years ago

Bug description

Extension fails to install when using this docker image: https://gist.github.com/phumberdroz/6bf1170217894ca6de82aa1460fd1ffc

See the attached error file in the gist.

PHP version

PHP 8.0.15 (cli) (built: Jan 21 2022 00:23:45) ( NTS ) Copyright (c) The PHP Group Zend Engine v4.0.15, Copyright (c) Zend Technologies with Zend OPcache v8.0.15, Copyright (c), by Zend Technologies

Tracer version

Installed extensions

[PHP Modules] bcmath bz2 calendar Core ctype curl date dom exif fileinfo filter ftp gd gettext gmp hash iconv imap intl json ldap libxml mbstring mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_sqlite Phar posix readline Reflection session SimpleXML soap sockets sodium SPL sqlite3 standard tidy tokenizer xml xmlreader xmlwriter xsl Zend OPcache zip zlib

[Zend Modules] Zend OPcache

OS info

PRETTY_NAME="Debian GNU/Linux 10 (buster)" NAME="Debian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster

Diagnostics and configuration

labbati commented 2 years ago

Bitnami images install PHP in an uncommon path.

As a workaround change your Dockerfile setting DD_TRACE_PHP_BIN=/opt/bitnami/php/bin/php, e.g.

FROM bitnami/php-fpm:8.0-prod

ARG DD_APM_VERSION=0.70.0

ENV DD_TRACE_PHP_BIN=/opt/bitnami/php/bin/php

RUN wget -nv https://github.com/DataDog/dd-trace-php/releases/download/0.70.0/datadog-php-tracer_0.70.0_amd64.deb && \
    dpkg -i datadog-php-tracer_0.70.0_amd64.deb

We will make sure to include this additional path to the paths we scan.

Thank you for opening this issue and for the reproduction case.