Skip to content

Commit 900894e

Browse files
authored
Merge pull request #278 from WyriHaximusNet/add-otel-related-extensions
Add OTEL related extensions
2 parents a196d3f + 9901c8d commit 900894e

File tree

7 files changed

+23
-4
lines changed

7 files changed

+23
-4
lines changed

Dockerfile-nts-alpine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
7373
$PHPIZE_DEPS \
7474
## Install PECL
7575
&& wget -q pear.php.net/go-pear.phar && php go-pear.phar \
76-
&& install-php-extensions pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv opcache intl sockets \
76+
&& install-php-extensions pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv opcache intl sockets ffi opentelemetry grpc \
7777
&& (install-php-extensions random || true) \
7878
&& (pecl install eio || pecl install eio-beta) \
7979
&& docker-php-ext-enable eio \

Dockerfile-nts-debian

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
7171
wget \
7272
gdb \
7373
$PHPIZE_DEPS \
74-
&& docker-php-ext-install -j$(nproc) pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv intl sockets \
74+
&& docker-php-ext-install -j$(nproc) pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv intl sockets ffi opentelemetry grpc \
7575
&& (docker-php-ext-install -j$(nproc) random || true) \
7676
&& (pecl install eio || pecl install eio-beta) \
7777
&& docker-php-ext-enable eio \

Dockerfile-zts-alpine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
7777
$PHPIZE_DEPS \
7878
## Install PECL
7979
&& wget -q pear.php.net/go-pear.phar && php go-pear.phar \
80-
&& install-php-extensions pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv opcache intl sockets \
80+
&& install-php-extensions pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv opcache intl sockets ffi opentelemetry grpc \
8181
&& (install-php-extensions random || true) \
8282
&& pecl install parallel || pecl install parallel-1.1.4 \
8383
&& docker-php-ext-enable parallel \

Dockerfile-zts-debian

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ RUN EXTENSION_DIR=`php-config --extension-dir 2>/dev/null` && \
7272
wget \
7373
gdb \
7474
$PHPIZE_DEPS \
75-
&& docker-php-ext-install -j$(nproc) pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv intl sockets \
75+
&& docker-php-ext-install -j$(nproc) pcntl pgsql pdo pdo_pgsql bcmath zip gmp iconv intl sockets ffi opentelemetry grpc \
7676
&& (docker-php-ext-install -j$(nproc) random || true) \
7777
&& pecl install parallel || pecl install parallel-1.1.4 \
7878
&& docker-php-ext-enable parallel \

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,18 +104,21 @@ Both versions come with the following list of non-non-blocking related (core-) e
104104
* curl
105105
* date
106106
* dom
107+
* ffi
107108
* fileinfo
108109
* filter
109110
* ftp
110111
* gd
111112
* gmp
113+
* grpc
112114
* hash
113115
* iconv
114116
* json
115117
* libxml
116118
* mbstring
117119
* mysqlnd
118120
* openssl
121+
* opentelemetry
119122
* pcre
120123
* PDO
121124
* pdo_pgsql

src/php/cli/conf/otel.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
opentelemetry.attr_hooks_enabled = On

test/container/test_php_ext.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,21 @@ def test_xdebug_is_not_loaded(host):
7676
def test_zip_is_loaded(host):
7777
assert 'zip' in host.run('php -m').stdout
7878

79+
@pytest.mark.php_zts
80+
@pytest.mark.php_nts
81+
def test_ffs_is_loaded(host):
82+
assert 'FFI' in host.run('php -m').stdout
83+
84+
@pytest.mark.php_zts
85+
@pytest.mark.php_nts
86+
def test_grpc_is_loaded(host):
87+
assert 'grpc' in host.run('php -m').stdout
88+
89+
@pytest.mark.php_zts
90+
@pytest.mark.php_nts
91+
def test_opentelemetry_is_loaded(host):
92+
assert 'opentelemetry' in host.run('php -m').stdout
93+
7994
@pytest.mark.php_zts
8095
@pytest.mark.php_nts
8196
def test_zip_is_loaded(host):

0 commit comments

Comments
 (0)