Skip to content

Commit

Permalink
Test Otel
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderM91 committed Dec 17, 2024
1 parent 59df613 commit c56c355
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions alpine/3.20/8.3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ ARG PHP_RUN_DEPS="\
libxpm \
libxslt \
libzip \
protobuf \
grpc \
rabbitmq-c"

ARG PHP_BUILD_DEPS="\
Expand Down Expand Up @@ -69,15 +67,15 @@ ARG PHP_EXTENSIONS="\

ARG PHP_PECL_EXTENSIONS="\
apcu \
opentelemetry \
protobuf \
grpc \
redis"

ARG ADDITIONAL_PHP_PECL_EXTENSIONS="\
pcov \
xdebug \
xhprof \
opentelemetry \
protobuf \
grpc \
amqp"

ARG GRAPHVIZ_BUILD_DEPS="\
Expand Down Expand Up @@ -117,7 +115,7 @@ RUN apk update \
--with-webp=/usr \
--with-xpm=/usr \
&& docker-php-ext-install -j5 ${PHP_EXTENSIONS} \
&& pecl install -o -f ${PHP_PECL_EXTENSIONS} ${ADDITIONAL_PHP_PECL_EXTENSIONS} \
&& MAKEFLAGS="-j$(nproc)" pecl install -o -f ${PHP_PECL_EXTENSIONS} ${ADDITIONAL_PHP_PECL_EXTENSIONS} \
&& rm -rf /tmp/pear \
&& docker-php-ext-enable ${PHP_EXTENSIONS} ${PHP_PECL_EXTENSIONS} \
&& apk del --no-cache .php-build-deps
Expand Down Expand Up @@ -191,6 +189,15 @@ COPY context/php/conf.d/90-opcache.ini /usr/local/etc/php/conf.d/
COPY context/php/conf.d/92-session.ini /usr/local/etc/php/conf.d/
COPY context/php/disabled /usr/local/etc/php/disabled

#OTEL: disable code instrumentattion by default
ENV OTEL_SDK_DISABLED=true
ENV OTEL_PHP_DISABLED_INSTRUMENTATIONS="all"

#OTEL: Disable OTEL related extensions and keep original configs.
RUN mv /usr/local/etc/php/conf.d/docker-php-ext-opentelemetry.ini /usr/local/etc/php/disabled/opentelemetry.ini
RUN mv /usr/local/etc/php/conf.d/docker-php-ext-protobuf.ini /usr/local/etc/php/disabled/protobuf.ini
RUN mv /usr/local/etc/php/conf.d/docker-php-ext-grpc.ini /usr/local/etc/php/disabled/grpc.ini

WORKDIR /data

# Install composer
Expand All @@ -206,4 +213,4 @@ ENV COMPOSER_MEMORY_LIMIT=-1
RUN mkdir -p /home/spryker/.composer
RUN bash -c '[[ $COMPOSER_VERSION == "1"* ]] && composer global require hirak/prestissimo && rm -rf /home/spryker/.composer/cache || true'

USER root
USER root

0 comments on commit c56c355

Please sign in to comment.