From 7554b6129a730de77ed93b85f49cc2ddbf655e1d Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Tue, 29 Oct 2024 13:30:32 +0200 Subject: [PATCH 01/16] Build docker image for PHP autointrumentation --- .../publish-autoinstrumentation-php.yaml | 78 +++++++ autoinstrumentation/php/Dockerfile | 15 ++ autoinstrumentation/php/composer_PHP_8.0.json | 34 ++++ autoinstrumentation/php/composer_PHP_8.1.json | 34 ++++ autoinstrumentation/php/composer_PHP_8.2.json | 35 ++++ .../php/prepare_files_for_docker_image.sh | 191 ++++++++++++++++++ 6 files changed, 387 insertions(+) create mode 100644 .github/workflows/publish-autoinstrumentation-php.yaml create mode 100644 autoinstrumentation/php/Dockerfile create mode 100644 autoinstrumentation/php/composer_PHP_8.0.json create mode 100644 autoinstrumentation/php/composer_PHP_8.1.json create mode 100644 autoinstrumentation/php/composer_PHP_8.2.json create mode 100644 autoinstrumentation/php/prepare_files_for_docker_image.sh diff --git a/.github/workflows/publish-autoinstrumentation-php.yaml b/.github/workflows/publish-autoinstrumentation-php.yaml new file mode 100644 index 0000000000..e124b23a60 --- /dev/null +++ b/.github/workflows/publish-autoinstrumentation-php.yaml @@ -0,0 +1,78 @@ +name: "Publish PHP Auto-Instrumentation" + +on: + push: + paths: + - 'autoinstrumentation/php/**' + - '.github/workflows/publish-autoinstrumentation-php.yaml' + branches: + - main + pull_request: + paths: + - 'autoinstrumentation/php/**' + - '.github/workflows/publish-autoinstrumentation-php.yaml' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + publish: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + + - name: Read version + run: echo "VERSION=$(cat autoinstrumentation/php/version.txt)" >> $GITHUB_ENV + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: | + otel/autoinstrumentation-php + ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-php + tags: | + type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Cache Docker layers + uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Log into Docker.io + uses: docker/login-action@v3 + if: ${{ github.event_name == 'push' }} + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Login to GitHub Package Registry + uses: docker/login-action@v3 + if: ${{ github.event_name == 'push' }} + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Prepare files for docker image + run: ./autoinstrumentation/php/prepare_files_for_docker_image.sh --ext-ver ${{ env.VERSION }} --dest-dir ${PWD}/autoinstrumentation/php/files_for_docker_image + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: autoinstrumentation/php + push: ${{ github.event_name == 'push' }} + build-args: SUB_DIR_WITH_FILES_FOR_DOCKER_IMAGE=${PWD}/autoinstrumentation/php/files_for_docker_image + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/autoinstrumentation/php/Dockerfile b/autoinstrumentation/php/Dockerfile new file mode 100644 index 0000000000..77f0d7c09b --- /dev/null +++ b/autoinstrumentation/php/Dockerfile @@ -0,0 +1,15 @@ +# To build one auto-instrumentation image for php, please: +# - Download your php auto-instrumentation artefacts to `/autoinstrumentation` directory. This is required as when instrumenting the pod, +# one init container will be created to copy the files to your app's container. +# - Grant the necessary access to the files in the `/autoinstrumentation` directory. +# - Following environment variables are injected to the application container to enable the auto-instrumentation. +# PHP_INI_SCAN_DIR=:/otel-auto-instrumentation-php/php_ini_scan_dir +# OTEL_PHP_AUTOLOAD_ENABLED=true +# - For auto-instrumentation by container injection, the Linux command cp is +# used and must be availabe in the image. + +FROM busybox + +ARG SUB_DIR_WITH_FILES_FOR_DOCKER_IMAGE + +COPY ${SUB_DIR_WITH_FILES_FOR_DOCKER_IMAGE} /autoinstrumentation/ diff --git a/autoinstrumentation/php/composer_PHP_8.0.json b/autoinstrumentation/php/composer_PHP_8.0.json new file mode 100644 index 0000000000..778027254e --- /dev/null +++ b/autoinstrumentation/php/composer_PHP_8.0.json @@ -0,0 +1,34 @@ +{ + "name": "open-telemetry/operator-autoinstrumentation-php", + "description": "OpenTelemetry PHP auto-instrumentation packages to include in the image used by OpenTelemetry Operator for Kubernetes", + "type": "project", + "require": { + "open-telemetry/exporter-otlp": "1.0.4", + "open-telemetry/opentelemetry-auto-guzzle": "1.0.1", + "open-telemetry/opentelemetry-auto-http-async": "1.0.1", + "open-telemetry/opentelemetry-auto-laravel": "1.0.0", + "open-telemetry/opentelemetry-auto-psr15": "1.0.6", + "open-telemetry/opentelemetry-auto-psr18": "1.0.4", + "open-telemetry/opentelemetry-auto-slim": "1.0.7", + "open-telemetry/opentelemetry-auto-symfony": "1.0.0beta30", + "open-telemetry/opentelemetry-auto-wordpress": "0.0.16", + "open-telemetry/sdk": "1.0.8", + "php-http/guzzle7-adapter": "1.0.0" + }, + "provide": { + "psr/http-client": "*", + "psr/http-server-middleware": "*", + "laravel/framework": "*", + "slim/slim": "*", + "symfony/http-client-contracts": "*", + "symfony/http-kernel": "*" + }, + "config": { + "process-timeout": 0, + "sort-packages": true, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true, + "php-http/discovery": true + } + } +} diff --git a/autoinstrumentation/php/composer_PHP_8.1.json b/autoinstrumentation/php/composer_PHP_8.1.json new file mode 100644 index 0000000000..b0d180b632 --- /dev/null +++ b/autoinstrumentation/php/composer_PHP_8.1.json @@ -0,0 +1,34 @@ +{ + "name": "open-telemetry/operator-autoinstrumentation-php", + "description": "OpenTelemetry PHP auto-instrumentation packages to include in the image used by OpenTelemetry Operator for Kubernetes", + "type": "project", + "require": { + "open-telemetry/exporter-otlp": "1.1.0", + "open-telemetry/opentelemetry-auto-guzzle": "1.0.1", + "open-telemetry/opentelemetry-auto-http-async": "1.0.1", + "open-telemetry/opentelemetry-auto-laravel": "1.0.0", + "open-telemetry/opentelemetry-auto-psr15": "1.0.6", + "open-telemetry/opentelemetry-auto-psr18": "1.0.4", + "open-telemetry/opentelemetry-auto-slim": "1.0.7", + "open-telemetry/opentelemetry-auto-symfony": "1.0.0beta30", + "open-telemetry/opentelemetry-auto-wordpress": "0.0.16", + "open-telemetry/sdk": "1.1.2", + "php-http/guzzle7-adapter": "1.0.0" + }, + "provide": { + "psr/http-client": "*", + "psr/http-server-middleware": "*", + "laravel/framework": "*", + "slim/slim": "*", + "symfony/http-client-contracts": "*", + "symfony/http-kernel": "*" + }, + "config": { + "process-timeout": 0, + "sort-packages": true, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true, + "php-http/discovery": true + } + } +} diff --git a/autoinstrumentation/php/composer_PHP_8.2.json b/autoinstrumentation/php/composer_PHP_8.2.json new file mode 100644 index 0000000000..6b1eda7383 --- /dev/null +++ b/autoinstrumentation/php/composer_PHP_8.2.json @@ -0,0 +1,35 @@ +{ + "name": "open-telemetry/operator-autoinstrumentation-php", + "description": "OpenTelemetry PHP auto-instrumentation packages to include in the image used by OpenTelemetry Operator for Kubernetes", + "type": "project", + "require": { + "open-telemetry/exporter-otlp": "1.1.0", + "open-telemetry/opentelemetry-auto-guzzle": "1.0.1", + "open-telemetry/opentelemetry-auto-http-async": "1.0.1", + "open-telemetry/opentelemetry-auto-laravel": "1.0.0", + "open-telemetry/opentelemetry-auto-pdo": "0.0.16", + "open-telemetry/opentelemetry-auto-psr15": "1.0.6", + "open-telemetry/opentelemetry-auto-psr18": "1.0.4", + "open-telemetry/opentelemetry-auto-slim": "1.0.7", + "open-telemetry/opentelemetry-auto-symfony": "1.0.0beta30", + "open-telemetry/opentelemetry-auto-wordpress": "0.0.16", + "open-telemetry/sdk": "1.1.2", + "php-http/guzzle7-adapter": "1.0.0" + }, + "provide": { + "psr/http-client": "*", + "psr/http-server-middleware": "*", + "laravel/framework": "*", + "slim/slim": "*", + "symfony/http-client-contracts": "*", + "symfony/http-kernel": "*" + }, + "config": { + "process-timeout": 0, + "sort-packages": true, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true, + "php-http/discovery": true + } + } +} diff --git a/autoinstrumentation/php/prepare_files_for_docker_image.sh b/autoinstrumentation/php/prepare_files_for_docker_image.sh new file mode 100644 index 0000000000..c735ba6503 --- /dev/null +++ b/autoinstrumentation/php/prepare_files_for_docker_image.sh @@ -0,0 +1,191 @@ +#!/usr/bin/env bash +set -e + +PHP_versions=(8.0) +#PHP_versions=(8.0 8.1 8.2 8.3) +#libc_variants=(musl) +libc_variants=(glibc musl) + +show_help() { + echo "Usage: $0 --ext-ver --dest-dir " + echo + echo "Arguments:" + echo " - opentelemetry PHP extension version to use. This argument is mandatory." + echo " - Directory to store files for docker image. All existing files in this directory will be deleted. This argument is mandatory." + echo + echo "Example:" + echo " $0 ./files_for_docker_image" +} + +parse_args() { + while [[ "$#" -gt 0 ]]; do + case $1 in + --ext-ver) + opentelemetry_extension_version="$2" + shift + ;; + --dest-dir) + destination_directory="$2" + shift + ;; + --help) + show_help + exit 0 + ;; + *) + echo "Unknown parameter passed: $1" + show_help + exit 1 + ;; + esac + shift + done + + if [ -z "${opentelemetry_extension_version}" ] ; then + echo " argument is missing" + show_help + exit 1 + fi + if [ -z "${destination_directory}" ] ; then + echo " argument is missing" + show_help + exit 1 + fi +} + +ensure_dir_exists_and_empty() { + local dir_to_clean="${1:?}" + + if [ -d "${dir_to_clean}" ]; then + rm -rf "${dir_to_clean}" + if [ -d "${dir_to_clean}" ]; then + echo "Directory ${dir_to_clean} still exists. Directory content:" + ls -l "${dir_to_clean}" + exit 1 + fi + else + mkdir -p "${dir_to_clean}" + fi +} + +build_native_binaries_for_PHP_version_libc_variant() { + local PHP_version="${1:?}" + local libc_variant="${2:?}" + local dest_dir_for_current_args + dest_dir_for_current_args="${destination_directory}/native_binaries/PHP_${PHP_version}_${libc_variant}" + + echo "Building extension binaries for PHP version: ${PHP_version} and libc variant: ${libc_variant} to ${dest_dir_for_current_args} ..." + + ensure_dir_exists_and_empty "${dest_dir_for_current_args}" + + local PHP_docker_image="php:${PHP_version}-cli" + local install_compiler_command="" + case "${libc_variant}" in + glibc) + ;; + musl) + PHP_docker_image="${PHP_docker_image}-alpine" + install_compiler_command="&& apk update && apk add autoconf build-base" + ;; + *) + echo "Unexpected PHP version: ${PHP_version}" + show_help + exit 1 + ;; + esac + + local current_user_id + current_user_id="$(id -u)" + local current_user_group_id + current_user_group_id="$(id -g)" + docker run --rm \ + -v "${dest_dir_for_current_args}:/dest_dir" \ + ${PHP_docker_image} sh -c "\ + mkdir -p /app && cd /app \ + ${install_compiler_command} \ + && pecl install opentelemetry-${opentelemetry_extension_version} \ + && cp /usr/local/lib/php/extensions/no-debug-non-zts-*/opentelemetry.so /dest_dir/ \ + && chown -R ${current_user_id}:${current_user_group_id} /dest_dir/" + + echo "Built extension binaries for PHP version: ${PHP_version} and libc variant: ${libc_variant}" +} + +build_native_binaries() { + echo "Building extension binaries..." + + for PHP_version in "${PHP_versions[@]}" ; do + for libc_variant in "${libc_variants[@]}" ; do + build_native_binaries_for_PHP_version_libc_variant "${PHP_version}" "${libc_variant}" + done + done + + echo "Built extension binaries" +} + +select_composer_json_for_PHP_version() { + local PHP_version="${1:?}" + case "${PHP_version}" in + 8.0|8.1|8.2) + echo "composer_PHP_${PHP_version}.json" + ;; + 8.3) + echo "composer_PHP_8.2.json" + ;; + *) + echo "Unexpected PHP version: ${PHP_version}" + show_help + exit 1 + ;; + esac +} + +download_PHP_packages_for_PHP_version() { + local PHP_version="${1:?}" + local dest_dir_for_current_args + dest_dir_for_current_args="${destination_directory}/PHP_packages/PHP_${PHP_version}" + + echo "Downloading PHP packages for PHP version: ${PHP_version} to ${dest_dir_for_current_args} ..." + + ensure_dir_exists_and_empty "${dest_dir_for_current_args}" + local composer_json_file_name + composer_json_file_name=$(select_composer_json_for_PHP_version "${PHP_version}") + local current_user_id + current_user_id="$(id -u)" + local current_user_group_id + current_user_group_id="$(id -g)" + docker run --rm \ + -v "${dest_dir_for_current_args}:/app/vendor" \ + -v "${PWD}/${composer_json_file_name}:/app/composer.json" \ + -w /app \ + php:${PHP_version}-cli sh -c "\ + apt-get update && apt-get install -y unzip \ + && curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=/usr/local/bin \ + && composer --ignore-platform-req=ext-opentelemetry --no-dev install \ + && chown -R ${current_user_id}:${current_user_group_id} ./vendor/" + + echo "Downloaded PHP packages for PHP version: ${PHP_version} to ${dest_dir_for_current_args}" +} + +download_PHP_packages() { + echo "Downloading PHP packages..." + + for PHP_version in "${PHP_versions[@]}" ; do + download_PHP_packages_for_PHP_version "${PHP_version}" + done + + echo "Downloaded PHP packages" +} + +main() { + parse_args "$@" + + echo "Preparing files for docker image into directory ${destination_directory} ..." + + ensure_dir_exists_and_empty "${destination_directory}" +# build_native_binaries + download_PHP_packages + + echo "Prepared files for docker image into directory ${destination_directory}" +} + +main "$@" From fcf6a252d01839d525283b801c5a9b2de0015bac Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Mon, 4 Nov 2024 12:21:31 +0200 Subject: [PATCH 02/16] Fixed parts were commented out during debugging --- autoinstrumentation/php/prepare_files_for_docker_image.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/autoinstrumentation/php/prepare_files_for_docker_image.sh b/autoinstrumentation/php/prepare_files_for_docker_image.sh index c735ba6503..82aa934805 100644 --- a/autoinstrumentation/php/prepare_files_for_docker_image.sh +++ b/autoinstrumentation/php/prepare_files_for_docker_image.sh @@ -1,9 +1,7 @@ #!/usr/bin/env bash set -e -PHP_versions=(8.0) -#PHP_versions=(8.0 8.1 8.2 8.3) -#libc_variants=(musl) +PHP_versions=(8.0 8.1 8.2 8.3) libc_variants=(glibc musl) show_help() { @@ -182,7 +180,7 @@ main() { echo "Preparing files for docker image into directory ${destination_directory} ..." ensure_dir_exists_and_empty "${destination_directory}" -# build_native_binaries + build_native_binaries download_PHP_packages echo "Prepared files for docker image into directory ${destination_directory}" From 7d8e7ad989f0b948e6c0c39d0e25b3556710352b Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Mon, 4 Nov 2024 12:23:10 +0200 Subject: [PATCH 03/16] Fixed path to relative since it's used in Dockerfile --- .github/workflows/publish-autoinstrumentation-php.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-autoinstrumentation-php.yaml b/.github/workflows/publish-autoinstrumentation-php.yaml index e124b23a60..fad3003754 100644 --- a/.github/workflows/publish-autoinstrumentation-php.yaml +++ b/.github/workflows/publish-autoinstrumentation-php.yaml @@ -71,7 +71,7 @@ jobs: with: context: autoinstrumentation/php push: ${{ github.event_name == 'push' }} - build-args: SUB_DIR_WITH_FILES_FOR_DOCKER_IMAGE=${PWD}/autoinstrumentation/php/files_for_docker_image + build-args: SUB_DIR_WITH_FILES_FOR_DOCKER_IMAGE=files_for_docker_image tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=local,src=/tmp/.buildx-cache From a96d7156a85bc34ad693134612ef141ae6f320b1 Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Wed, 6 Nov 2024 12:19:22 +0200 Subject: [PATCH 04/16] Marked autoinstrumentation/php/prepare_files_for_docker_image.sh as executable --- autoinstrumentation/php/prepare_files_for_docker_image.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 autoinstrumentation/php/prepare_files_for_docker_image.sh diff --git a/autoinstrumentation/php/prepare_files_for_docker_image.sh b/autoinstrumentation/php/prepare_files_for_docker_image.sh old mode 100644 new mode 100755 From fd6f9bb72c1a3df36413bb8116791cfab0a9864e Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Wed, 6 Nov 2024 14:42:53 +0200 Subject: [PATCH 05/16] Fixed error message in autoinstrumentation/php/prepare_files_for_docker_image.sh --- autoinstrumentation/php/prepare_files_for_docker_image.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/autoinstrumentation/php/prepare_files_for_docker_image.sh b/autoinstrumentation/php/prepare_files_for_docker_image.sh index 82aa934805..cb3ede4dfe 100755 --- a/autoinstrumentation/php/prepare_files_for_docker_image.sh +++ b/autoinstrumentation/php/prepare_files_for_docker_image.sh @@ -86,8 +86,7 @@ build_native_binaries_for_PHP_version_libc_variant() { install_compiler_command="&& apk update && apk add autoconf build-base" ;; *) - echo "Unexpected PHP version: ${PHP_version}" - show_help + echo "Unexpected libc variant: ${libc_variant}" exit 1 ;; esac @@ -131,7 +130,6 @@ select_composer_json_for_PHP_version() { ;; *) echo "Unexpected PHP version: ${PHP_version}" - show_help exit 1 ;; esac From 65101bf760e10ea64c8caa35b0144a4e62cd217d Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Tue, 29 Oct 2024 13:30:32 +0200 Subject: [PATCH 06/16] Build docker image for PHP autointrumentation --- .../publish-autoinstrumentation-php.yaml | 78 +++++++ autoinstrumentation/php/Dockerfile | 15 ++ autoinstrumentation/php/composer_PHP_8.0.json | 34 ++++ autoinstrumentation/php/composer_PHP_8.1.json | 34 ++++ autoinstrumentation/php/composer_PHP_8.2.json | 35 ++++ .../php/prepare_files_for_docker_image.sh | 191 ++++++++++++++++++ 6 files changed, 387 insertions(+) create mode 100644 .github/workflows/publish-autoinstrumentation-php.yaml create mode 100644 autoinstrumentation/php/Dockerfile create mode 100644 autoinstrumentation/php/composer_PHP_8.0.json create mode 100644 autoinstrumentation/php/composer_PHP_8.1.json create mode 100644 autoinstrumentation/php/composer_PHP_8.2.json create mode 100644 autoinstrumentation/php/prepare_files_for_docker_image.sh diff --git a/.github/workflows/publish-autoinstrumentation-php.yaml b/.github/workflows/publish-autoinstrumentation-php.yaml new file mode 100644 index 0000000000..e124b23a60 --- /dev/null +++ b/.github/workflows/publish-autoinstrumentation-php.yaml @@ -0,0 +1,78 @@ +name: "Publish PHP Auto-Instrumentation" + +on: + push: + paths: + - 'autoinstrumentation/php/**' + - '.github/workflows/publish-autoinstrumentation-php.yaml' + branches: + - main + pull_request: + paths: + - 'autoinstrumentation/php/**' + - '.github/workflows/publish-autoinstrumentation-php.yaml' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + publish: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + + - name: Read version + run: echo "VERSION=$(cat autoinstrumentation/php/version.txt)" >> $GITHUB_ENV + + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: | + otel/autoinstrumentation-php + ghcr.io/open-telemetry/opentelemetry-operator/autoinstrumentation-php + tags: | + type=match,pattern=v(.*),group=1,value=v${{ env.VERSION }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Cache Docker layers + uses: actions/cache@v4 + with: + path: /tmp/.buildx-cache + key: ${{ runner.os }}-buildx-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-buildx- + + - name: Log into Docker.io + uses: docker/login-action@v3 + if: ${{ github.event_name == 'push' }} + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Login to GitHub Package Registry + uses: docker/login-action@v3 + if: ${{ github.event_name == 'push' }} + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Prepare files for docker image + run: ./autoinstrumentation/php/prepare_files_for_docker_image.sh --ext-ver ${{ env.VERSION }} --dest-dir ${PWD}/autoinstrumentation/php/files_for_docker_image + + - name: Build and push + uses: docker/build-push-action@v6 + with: + context: autoinstrumentation/php + push: ${{ github.event_name == 'push' }} + build-args: SUB_DIR_WITH_FILES_FOR_DOCKER_IMAGE=${PWD}/autoinstrumentation/php/files_for_docker_image + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache diff --git a/autoinstrumentation/php/Dockerfile b/autoinstrumentation/php/Dockerfile new file mode 100644 index 0000000000..77f0d7c09b --- /dev/null +++ b/autoinstrumentation/php/Dockerfile @@ -0,0 +1,15 @@ +# To build one auto-instrumentation image for php, please: +# - Download your php auto-instrumentation artefacts to `/autoinstrumentation` directory. This is required as when instrumenting the pod, +# one init container will be created to copy the files to your app's container. +# - Grant the necessary access to the files in the `/autoinstrumentation` directory. +# - Following environment variables are injected to the application container to enable the auto-instrumentation. +# PHP_INI_SCAN_DIR=:/otel-auto-instrumentation-php/php_ini_scan_dir +# OTEL_PHP_AUTOLOAD_ENABLED=true +# - For auto-instrumentation by container injection, the Linux command cp is +# used and must be availabe in the image. + +FROM busybox + +ARG SUB_DIR_WITH_FILES_FOR_DOCKER_IMAGE + +COPY ${SUB_DIR_WITH_FILES_FOR_DOCKER_IMAGE} /autoinstrumentation/ diff --git a/autoinstrumentation/php/composer_PHP_8.0.json b/autoinstrumentation/php/composer_PHP_8.0.json new file mode 100644 index 0000000000..778027254e --- /dev/null +++ b/autoinstrumentation/php/composer_PHP_8.0.json @@ -0,0 +1,34 @@ +{ + "name": "open-telemetry/operator-autoinstrumentation-php", + "description": "OpenTelemetry PHP auto-instrumentation packages to include in the image used by OpenTelemetry Operator for Kubernetes", + "type": "project", + "require": { + "open-telemetry/exporter-otlp": "1.0.4", + "open-telemetry/opentelemetry-auto-guzzle": "1.0.1", + "open-telemetry/opentelemetry-auto-http-async": "1.0.1", + "open-telemetry/opentelemetry-auto-laravel": "1.0.0", + "open-telemetry/opentelemetry-auto-psr15": "1.0.6", + "open-telemetry/opentelemetry-auto-psr18": "1.0.4", + "open-telemetry/opentelemetry-auto-slim": "1.0.7", + "open-telemetry/opentelemetry-auto-symfony": "1.0.0beta30", + "open-telemetry/opentelemetry-auto-wordpress": "0.0.16", + "open-telemetry/sdk": "1.0.8", + "php-http/guzzle7-adapter": "1.0.0" + }, + "provide": { + "psr/http-client": "*", + "psr/http-server-middleware": "*", + "laravel/framework": "*", + "slim/slim": "*", + "symfony/http-client-contracts": "*", + "symfony/http-kernel": "*" + }, + "config": { + "process-timeout": 0, + "sort-packages": true, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true, + "php-http/discovery": true + } + } +} diff --git a/autoinstrumentation/php/composer_PHP_8.1.json b/autoinstrumentation/php/composer_PHP_8.1.json new file mode 100644 index 0000000000..b0d180b632 --- /dev/null +++ b/autoinstrumentation/php/composer_PHP_8.1.json @@ -0,0 +1,34 @@ +{ + "name": "open-telemetry/operator-autoinstrumentation-php", + "description": "OpenTelemetry PHP auto-instrumentation packages to include in the image used by OpenTelemetry Operator for Kubernetes", + "type": "project", + "require": { + "open-telemetry/exporter-otlp": "1.1.0", + "open-telemetry/opentelemetry-auto-guzzle": "1.0.1", + "open-telemetry/opentelemetry-auto-http-async": "1.0.1", + "open-telemetry/opentelemetry-auto-laravel": "1.0.0", + "open-telemetry/opentelemetry-auto-psr15": "1.0.6", + "open-telemetry/opentelemetry-auto-psr18": "1.0.4", + "open-telemetry/opentelemetry-auto-slim": "1.0.7", + "open-telemetry/opentelemetry-auto-symfony": "1.0.0beta30", + "open-telemetry/opentelemetry-auto-wordpress": "0.0.16", + "open-telemetry/sdk": "1.1.2", + "php-http/guzzle7-adapter": "1.0.0" + }, + "provide": { + "psr/http-client": "*", + "psr/http-server-middleware": "*", + "laravel/framework": "*", + "slim/slim": "*", + "symfony/http-client-contracts": "*", + "symfony/http-kernel": "*" + }, + "config": { + "process-timeout": 0, + "sort-packages": true, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true, + "php-http/discovery": true + } + } +} diff --git a/autoinstrumentation/php/composer_PHP_8.2.json b/autoinstrumentation/php/composer_PHP_8.2.json new file mode 100644 index 0000000000..6b1eda7383 --- /dev/null +++ b/autoinstrumentation/php/composer_PHP_8.2.json @@ -0,0 +1,35 @@ +{ + "name": "open-telemetry/operator-autoinstrumentation-php", + "description": "OpenTelemetry PHP auto-instrumentation packages to include in the image used by OpenTelemetry Operator for Kubernetes", + "type": "project", + "require": { + "open-telemetry/exporter-otlp": "1.1.0", + "open-telemetry/opentelemetry-auto-guzzle": "1.0.1", + "open-telemetry/opentelemetry-auto-http-async": "1.0.1", + "open-telemetry/opentelemetry-auto-laravel": "1.0.0", + "open-telemetry/opentelemetry-auto-pdo": "0.0.16", + "open-telemetry/opentelemetry-auto-psr15": "1.0.6", + "open-telemetry/opentelemetry-auto-psr18": "1.0.4", + "open-telemetry/opentelemetry-auto-slim": "1.0.7", + "open-telemetry/opentelemetry-auto-symfony": "1.0.0beta30", + "open-telemetry/opentelemetry-auto-wordpress": "0.0.16", + "open-telemetry/sdk": "1.1.2", + "php-http/guzzle7-adapter": "1.0.0" + }, + "provide": { + "psr/http-client": "*", + "psr/http-server-middleware": "*", + "laravel/framework": "*", + "slim/slim": "*", + "symfony/http-client-contracts": "*", + "symfony/http-kernel": "*" + }, + "config": { + "process-timeout": 0, + "sort-packages": true, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true, + "php-http/discovery": true + } + } +} diff --git a/autoinstrumentation/php/prepare_files_for_docker_image.sh b/autoinstrumentation/php/prepare_files_for_docker_image.sh new file mode 100644 index 0000000000..c735ba6503 --- /dev/null +++ b/autoinstrumentation/php/prepare_files_for_docker_image.sh @@ -0,0 +1,191 @@ +#!/usr/bin/env bash +set -e + +PHP_versions=(8.0) +#PHP_versions=(8.0 8.1 8.2 8.3) +#libc_variants=(musl) +libc_variants=(glibc musl) + +show_help() { + echo "Usage: $0 --ext-ver --dest-dir " + echo + echo "Arguments:" + echo " - opentelemetry PHP extension version to use. This argument is mandatory." + echo " - Directory to store files for docker image. All existing files in this directory will be deleted. This argument is mandatory." + echo + echo "Example:" + echo " $0 ./files_for_docker_image" +} + +parse_args() { + while [[ "$#" -gt 0 ]]; do + case $1 in + --ext-ver) + opentelemetry_extension_version="$2" + shift + ;; + --dest-dir) + destination_directory="$2" + shift + ;; + --help) + show_help + exit 0 + ;; + *) + echo "Unknown parameter passed: $1" + show_help + exit 1 + ;; + esac + shift + done + + if [ -z "${opentelemetry_extension_version}" ] ; then + echo " argument is missing" + show_help + exit 1 + fi + if [ -z "${destination_directory}" ] ; then + echo " argument is missing" + show_help + exit 1 + fi +} + +ensure_dir_exists_and_empty() { + local dir_to_clean="${1:?}" + + if [ -d "${dir_to_clean}" ]; then + rm -rf "${dir_to_clean}" + if [ -d "${dir_to_clean}" ]; then + echo "Directory ${dir_to_clean} still exists. Directory content:" + ls -l "${dir_to_clean}" + exit 1 + fi + else + mkdir -p "${dir_to_clean}" + fi +} + +build_native_binaries_for_PHP_version_libc_variant() { + local PHP_version="${1:?}" + local libc_variant="${2:?}" + local dest_dir_for_current_args + dest_dir_for_current_args="${destination_directory}/native_binaries/PHP_${PHP_version}_${libc_variant}" + + echo "Building extension binaries for PHP version: ${PHP_version} and libc variant: ${libc_variant} to ${dest_dir_for_current_args} ..." + + ensure_dir_exists_and_empty "${dest_dir_for_current_args}" + + local PHP_docker_image="php:${PHP_version}-cli" + local install_compiler_command="" + case "${libc_variant}" in + glibc) + ;; + musl) + PHP_docker_image="${PHP_docker_image}-alpine" + install_compiler_command="&& apk update && apk add autoconf build-base" + ;; + *) + echo "Unexpected PHP version: ${PHP_version}" + show_help + exit 1 + ;; + esac + + local current_user_id + current_user_id="$(id -u)" + local current_user_group_id + current_user_group_id="$(id -g)" + docker run --rm \ + -v "${dest_dir_for_current_args}:/dest_dir" \ + ${PHP_docker_image} sh -c "\ + mkdir -p /app && cd /app \ + ${install_compiler_command} \ + && pecl install opentelemetry-${opentelemetry_extension_version} \ + && cp /usr/local/lib/php/extensions/no-debug-non-zts-*/opentelemetry.so /dest_dir/ \ + && chown -R ${current_user_id}:${current_user_group_id} /dest_dir/" + + echo "Built extension binaries for PHP version: ${PHP_version} and libc variant: ${libc_variant}" +} + +build_native_binaries() { + echo "Building extension binaries..." + + for PHP_version in "${PHP_versions[@]}" ; do + for libc_variant in "${libc_variants[@]}" ; do + build_native_binaries_for_PHP_version_libc_variant "${PHP_version}" "${libc_variant}" + done + done + + echo "Built extension binaries" +} + +select_composer_json_for_PHP_version() { + local PHP_version="${1:?}" + case "${PHP_version}" in + 8.0|8.1|8.2) + echo "composer_PHP_${PHP_version}.json" + ;; + 8.3) + echo "composer_PHP_8.2.json" + ;; + *) + echo "Unexpected PHP version: ${PHP_version}" + show_help + exit 1 + ;; + esac +} + +download_PHP_packages_for_PHP_version() { + local PHP_version="${1:?}" + local dest_dir_for_current_args + dest_dir_for_current_args="${destination_directory}/PHP_packages/PHP_${PHP_version}" + + echo "Downloading PHP packages for PHP version: ${PHP_version} to ${dest_dir_for_current_args} ..." + + ensure_dir_exists_and_empty "${dest_dir_for_current_args}" + local composer_json_file_name + composer_json_file_name=$(select_composer_json_for_PHP_version "${PHP_version}") + local current_user_id + current_user_id="$(id -u)" + local current_user_group_id + current_user_group_id="$(id -g)" + docker run --rm \ + -v "${dest_dir_for_current_args}:/app/vendor" \ + -v "${PWD}/${composer_json_file_name}:/app/composer.json" \ + -w /app \ + php:${PHP_version}-cli sh -c "\ + apt-get update && apt-get install -y unzip \ + && curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=/usr/local/bin \ + && composer --ignore-platform-req=ext-opentelemetry --no-dev install \ + && chown -R ${current_user_id}:${current_user_group_id} ./vendor/" + + echo "Downloaded PHP packages for PHP version: ${PHP_version} to ${dest_dir_for_current_args}" +} + +download_PHP_packages() { + echo "Downloading PHP packages..." + + for PHP_version in "${PHP_versions[@]}" ; do + download_PHP_packages_for_PHP_version "${PHP_version}" + done + + echo "Downloaded PHP packages" +} + +main() { + parse_args "$@" + + echo "Preparing files for docker image into directory ${destination_directory} ..." + + ensure_dir_exists_and_empty "${destination_directory}" +# build_native_binaries + download_PHP_packages + + echo "Prepared files for docker image into directory ${destination_directory}" +} + +main "$@" From b367df683d6e264853c4bf60b021333d930afedf Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Mon, 4 Nov 2024 12:21:31 +0200 Subject: [PATCH 07/16] Fixed parts were commented out during debugging --- autoinstrumentation/php/prepare_files_for_docker_image.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/autoinstrumentation/php/prepare_files_for_docker_image.sh b/autoinstrumentation/php/prepare_files_for_docker_image.sh index c735ba6503..82aa934805 100644 --- a/autoinstrumentation/php/prepare_files_for_docker_image.sh +++ b/autoinstrumentation/php/prepare_files_for_docker_image.sh @@ -1,9 +1,7 @@ #!/usr/bin/env bash set -e -PHP_versions=(8.0) -#PHP_versions=(8.0 8.1 8.2 8.3) -#libc_variants=(musl) +PHP_versions=(8.0 8.1 8.2 8.3) libc_variants=(glibc musl) show_help() { @@ -182,7 +180,7 @@ main() { echo "Preparing files for docker image into directory ${destination_directory} ..." ensure_dir_exists_and_empty "${destination_directory}" -# build_native_binaries + build_native_binaries download_PHP_packages echo "Prepared files for docker image into directory ${destination_directory}" From 2a851960d7733ba6a31043cb59a5143c568c605b Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Mon, 4 Nov 2024 12:23:10 +0200 Subject: [PATCH 08/16] Fixed path to relative since it's used in Dockerfile --- .github/workflows/publish-autoinstrumentation-php.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-autoinstrumentation-php.yaml b/.github/workflows/publish-autoinstrumentation-php.yaml index e124b23a60..fad3003754 100644 --- a/.github/workflows/publish-autoinstrumentation-php.yaml +++ b/.github/workflows/publish-autoinstrumentation-php.yaml @@ -71,7 +71,7 @@ jobs: with: context: autoinstrumentation/php push: ${{ github.event_name == 'push' }} - build-args: SUB_DIR_WITH_FILES_FOR_DOCKER_IMAGE=${PWD}/autoinstrumentation/php/files_for_docker_image + build-args: SUB_DIR_WITH_FILES_FOR_DOCKER_IMAGE=files_for_docker_image tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} cache-from: type=local,src=/tmp/.buildx-cache From 9d803b35d1129d82b0a50f93a5b5feb65c105671 Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Wed, 6 Nov 2024 12:19:22 +0200 Subject: [PATCH 09/16] Marked autoinstrumentation/php/prepare_files_for_docker_image.sh as executable --- autoinstrumentation/php/prepare_files_for_docker_image.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 autoinstrumentation/php/prepare_files_for_docker_image.sh diff --git a/autoinstrumentation/php/prepare_files_for_docker_image.sh b/autoinstrumentation/php/prepare_files_for_docker_image.sh old mode 100644 new mode 100755 From 7c47b9513a3995d31867b97fd312aa1e9c2a56ec Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Wed, 6 Nov 2024 14:42:53 +0200 Subject: [PATCH 10/16] Fixed error message in autoinstrumentation/php/prepare_files_for_docker_image.sh --- autoinstrumentation/php/prepare_files_for_docker_image.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/autoinstrumentation/php/prepare_files_for_docker_image.sh b/autoinstrumentation/php/prepare_files_for_docker_image.sh index 82aa934805..cb3ede4dfe 100755 --- a/autoinstrumentation/php/prepare_files_for_docker_image.sh +++ b/autoinstrumentation/php/prepare_files_for_docker_image.sh @@ -86,8 +86,7 @@ build_native_binaries_for_PHP_version_libc_variant() { install_compiler_command="&& apk update && apk add autoconf build-base" ;; *) - echo "Unexpected PHP version: ${PHP_version}" - show_help + echo "Unexpected libc variant: ${libc_variant}" exit 1 ;; esac @@ -131,7 +130,6 @@ select_composer_json_for_PHP_version() { ;; *) echo "Unexpected PHP version: ${PHP_version}" - show_help exit 1 ;; esac From a235b0f8b03a2631e6067c25c2e363f26e3b6c86 Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Mon, 25 Nov 2024 13:11:18 +0200 Subject: [PATCH 11/16] Added missing autoinstrumentation/php/version.txt --- autoinstrumentation/php/version.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 autoinstrumentation/php/version.txt diff --git a/autoinstrumentation/php/version.txt b/autoinstrumentation/php/version.txt new file mode 100644 index 0000000000..9084fa2f71 --- /dev/null +++ b/autoinstrumentation/php/version.txt @@ -0,0 +1 @@ +1.1.0 From 37ddb18b5be2c08347bc488fed51ad43a36578d9 Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Mon, 25 Nov 2024 13:15:54 +0200 Subject: [PATCH 12/16] Removed support for PHP 8.0 Since PHP 8.0 support was removed from OpenTelemetry for PHP SDK (from version 1.1) --- autoinstrumentation/php/prepare_files_for_docker_image.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoinstrumentation/php/prepare_files_for_docker_image.sh b/autoinstrumentation/php/prepare_files_for_docker_image.sh index cb3ede4dfe..0c500791ca 100755 --- a/autoinstrumentation/php/prepare_files_for_docker_image.sh +++ b/autoinstrumentation/php/prepare_files_for_docker_image.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -PHP_versions=(8.0 8.1 8.2 8.3) +PHP_versions=(8.1 8.2 8.3) libc_variants=(glibc musl) show_help() { From 364c7b9f3cc2fc4aca843fce9e4da1b58939fc9e Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Mon, 25 Nov 2024 13:30:04 +0200 Subject: [PATCH 13/16] Updated versions of instrumentation packages to the latest --- autoinstrumentation/php/composer_PHP_8.0.json | 4 ++-- autoinstrumentation/php/composer_PHP_8.1.json | 2 +- autoinstrumentation/php/composer_PHP_8.2.json | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/autoinstrumentation/php/composer_PHP_8.0.json b/autoinstrumentation/php/composer_PHP_8.0.json index 778027254e..5c38170503 100644 --- a/autoinstrumentation/php/composer_PHP_8.0.json +++ b/autoinstrumentation/php/composer_PHP_8.0.json @@ -3,10 +3,10 @@ "description": "OpenTelemetry PHP auto-instrumentation packages to include in the image used by OpenTelemetry Operator for Kubernetes", "type": "project", "require": { - "open-telemetry/exporter-otlp": "1.0.4", + "open-telemetry/exporter-otlp": "1.1.0", "open-telemetry/opentelemetry-auto-guzzle": "1.0.1", "open-telemetry/opentelemetry-auto-http-async": "1.0.1", - "open-telemetry/opentelemetry-auto-laravel": "1.0.0", + "open-telemetry/opentelemetry-auto-laravel": "1.0.1", "open-telemetry/opentelemetry-auto-psr15": "1.0.6", "open-telemetry/opentelemetry-auto-psr18": "1.0.4", "open-telemetry/opentelemetry-auto-slim": "1.0.7", diff --git a/autoinstrumentation/php/composer_PHP_8.1.json b/autoinstrumentation/php/composer_PHP_8.1.json index b0d180b632..8ec4b22783 100644 --- a/autoinstrumentation/php/composer_PHP_8.1.json +++ b/autoinstrumentation/php/composer_PHP_8.1.json @@ -6,7 +6,7 @@ "open-telemetry/exporter-otlp": "1.1.0", "open-telemetry/opentelemetry-auto-guzzle": "1.0.1", "open-telemetry/opentelemetry-auto-http-async": "1.0.1", - "open-telemetry/opentelemetry-auto-laravel": "1.0.0", + "open-telemetry/opentelemetry-auto-laravel": "1.0.1", "open-telemetry/opentelemetry-auto-psr15": "1.0.6", "open-telemetry/opentelemetry-auto-psr18": "1.0.4", "open-telemetry/opentelemetry-auto-slim": "1.0.7", diff --git a/autoinstrumentation/php/composer_PHP_8.2.json b/autoinstrumentation/php/composer_PHP_8.2.json index 6b1eda7383..be90f9f430 100644 --- a/autoinstrumentation/php/composer_PHP_8.2.json +++ b/autoinstrumentation/php/composer_PHP_8.2.json @@ -6,7 +6,7 @@ "open-telemetry/exporter-otlp": "1.1.0", "open-telemetry/opentelemetry-auto-guzzle": "1.0.1", "open-telemetry/opentelemetry-auto-http-async": "1.0.1", - "open-telemetry/opentelemetry-auto-laravel": "1.0.0", + "open-telemetry/opentelemetry-auto-laravel": "1.0.1", "open-telemetry/opentelemetry-auto-pdo": "0.0.16", "open-telemetry/opentelemetry-auto-psr15": "1.0.6", "open-telemetry/opentelemetry-auto-psr18": "1.0.4", From cfbbc25c5a1bd9177a18eca63a5dab532b6d0c9c Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Mon, 25 Nov 2024 15:53:34 +0200 Subject: [PATCH 14/16] Fixed publish-autoinstrumentation-php.yaml Prepare files for docker image --- .github/workflows/publish-autoinstrumentation-php.yaml | 2 +- autoinstrumentation/php/prepare_files_for_docker_image.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-autoinstrumentation-php.yaml b/.github/workflows/publish-autoinstrumentation-php.yaml index fad3003754..dfe3bbbb7d 100644 --- a/.github/workflows/publish-autoinstrumentation-php.yaml +++ b/.github/workflows/publish-autoinstrumentation-php.yaml @@ -64,7 +64,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Prepare files for docker image - run: ./autoinstrumentation/php/prepare_files_for_docker_image.sh --ext-ver ${{ env.VERSION }} --dest-dir ${PWD}/autoinstrumentation/php/files_for_docker_image + run: pushd ./autoinstrumentation/php ; ./prepare_files_for_docker_image.sh --ext-ver ${{ env.VERSION }} --dest-dir ${PWD}/files_for_docker_image ; popd - name: Build and push uses: docker/build-push-action@v6 diff --git a/autoinstrumentation/php/prepare_files_for_docker_image.sh b/autoinstrumentation/php/prepare_files_for_docker_image.sh index 0c500791ca..941adbdbda 100755 --- a/autoinstrumentation/php/prepare_files_for_docker_image.sh +++ b/autoinstrumentation/php/prepare_files_for_docker_image.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -e +set -xe -o pipefail PHP_versions=(8.1 8.2 8.3) libc_variants=(glibc musl) From 3df842bc3ac1c06ed5e2346ce22ea1c6b233d618 Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Mon, 25 Nov 2024 16:00:26 +0200 Subject: [PATCH 15/16] Deleted composer_PHP_8.0.json that was used only for PHP 8.0 --- autoinstrumentation/php/composer_PHP_8.0.json | 34 ------------------- 1 file changed, 34 deletions(-) delete mode 100644 autoinstrumentation/php/composer_PHP_8.0.json diff --git a/autoinstrumentation/php/composer_PHP_8.0.json b/autoinstrumentation/php/composer_PHP_8.0.json deleted file mode 100644 index 5c38170503..0000000000 --- a/autoinstrumentation/php/composer_PHP_8.0.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "open-telemetry/operator-autoinstrumentation-php", - "description": "OpenTelemetry PHP auto-instrumentation packages to include in the image used by OpenTelemetry Operator for Kubernetes", - "type": "project", - "require": { - "open-telemetry/exporter-otlp": "1.1.0", - "open-telemetry/opentelemetry-auto-guzzle": "1.0.1", - "open-telemetry/opentelemetry-auto-http-async": "1.0.1", - "open-telemetry/opentelemetry-auto-laravel": "1.0.1", - "open-telemetry/opentelemetry-auto-psr15": "1.0.6", - "open-telemetry/opentelemetry-auto-psr18": "1.0.4", - "open-telemetry/opentelemetry-auto-slim": "1.0.7", - "open-telemetry/opentelemetry-auto-symfony": "1.0.0beta30", - "open-telemetry/opentelemetry-auto-wordpress": "0.0.16", - "open-telemetry/sdk": "1.0.8", - "php-http/guzzle7-adapter": "1.0.0" - }, - "provide": { - "psr/http-client": "*", - "psr/http-server-middleware": "*", - "laravel/framework": "*", - "slim/slim": "*", - "symfony/http-client-contracts": "*", - "symfony/http-kernel": "*" - }, - "config": { - "process-timeout": 0, - "sort-packages": true, - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true, - "php-http/discovery": true - } - } -} From 4b11a19a4d516d79b2413e62b2fc87c637b1806f Mon Sep 17 00:00:00 2001 From: Sergey Kleyman Date: Thu, 28 Nov 2024 12:43:59 +0200 Subject: [PATCH 16/16] Added PHP to /versions.txt --- versions.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/versions.txt b/versions.txt index 0820a83d2a..04e3c630c6 100644 --- a/versions.txt +++ b/versions.txt @@ -32,6 +32,10 @@ autoinstrumentation-dotnet=1.2.0 # Represents the current release of Go instrumentation. autoinstrumentation-go=v0.17.0-alpha +# Represents the current release of PHP instrumentation. +# Should match autoinstrumentation/php/version.txt +autoinstrumentation-PHP=1.1.0 + # Represents the current release of Apache HTTPD instrumentation. # Should match autoinstrumentation/apache-httpd/version.txt autoinstrumentation-apache-httpd=1.0.4