File tree Expand file tree Collapse file tree 4 files changed +31
-0
lines changed
Expand file tree Collapse file tree 4 files changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ functions:
7777| Newrelic | `${bref-extra:newrelic-php-81}` |
7878| ODBC Snowflake | `${bref-extra:odbc-snowflake-php-81}` |
7979| OpenSwoole | `${bref-extra:openswoole-php-81}` |
80+ | OpenTelemetry | `${bref-extra:opentelemetry-php-81}` |
8081| Oracle | `${bref-extra:oci8-php-80}` |
8182| Pcov | `${bref-extra:pcov-php-81}` |
8283| PostgreSQL | `${bref-extra:pgsql-php-81}` |
Original file line number Diff line number Diff line change 1+ ARG PHP_VERSION
2+ ARG BREF_VERSION
3+ FROM bref/build-php-$PHP_VERSION:$BREF_VERSION AS ext
4+
5+ RUN MAKEFLAGS="-j $(nproc)" pecl install opentelemetry-1.0.0 > /dev/null
6+ RUN cp `php-config --extension-dir`/opentelemetry.so /tmp/opentelemetry.so
7+ RUN strip --strip-debug /tmp/opentelemetry.so
8+ RUN echo 'extension=opentelemetry.so' > /tmp/ext.ini
9+
10+ # Build the final image with just the files we need
11+ FROM scratch
12+
13+ # Copy things we installed to the final image
14+ COPY --from=ext /tmp/opentelemetry.so /opt/bref/extensions/opentelemetry.so
15+ COPY --from=ext /tmp/ext.ini /opt/bref/etc/php/conf.d/ext-opentelemetry.ini
Original file line number Diff line number Diff line change 1+ {
2+ "php" : [
3+ " 80" ,
4+ " 81" ,
5+ " 82"
6+ ]
7+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ if (!function_exists ($ function = "OpenTelemetry\Instrumentation\hook " )) {
4+ echo sprintf ('FAIL: Function "%s" does not exist. ' , $ function ) . PHP_EOL ;
5+ exit (1 );
6+ }
7+
8+ exit (0 );
You can’t perform that action at this time.
0 commit comments