-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP zero code article code doesn't work #1437
PHP zero code article code doesn't work #1437
Comments
I'm working on testing your implementation locally as well: I believe this has to do with grpc. In your example, you have |
Ultimately I want to route traces to OTLP collector instead of console: docker network create jnet
docker run --rm --network jnet --name jbox -p 4317:4317 -p 16686:16686 jaegertracing/all-in-one:latest |
It looks like you also need to install the |
@brettmc thanks, works now. Yall should really put some specific code like in this issue in the documentation. It's hard to reproduce as it is. Updated dockerfile: FROM --platform=linux/amd64 php:8.3.13-alpine3.20
RUN apk add unzip git curl autoconf gcc g++ make linux-headers zlib-dev file
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN pecl install excimer
RUN pecl install opentelemetry && docker-php-ext-enable opentelemetry
RUN pecl install grpc
RUN docker-php-ext-enable grpc
RUN composer require slim/slim:4.14 slim/psr7 nyholm/psr7 nyholm/psr7-server laminas/laminas-diactoros open-telemetry/sdk open-telemetry/opentelemetry-auto-slim open-telemetry/opentelemetry-auto-psr18 open-telemetry/exporter-otlp open-telemetry/transport-grpc Update compose command: docker run --rm -v ".:/app" -w "/app" phpbox sh -c "composer require slim/slim:4.14 slim/psr7 nyholm/psr7 nyholm/psr7-server laminas/laminas-diactoros open-telemetry/sdk open-telemetry/opentelemetry-auto-slim open-telemetry/opentelemetry-auto-psr18 open-telemetry/exporter-otlp open-telemetry/transport-grpc" |
@RichardJECooke - We'll add this to the README.md. Thanks for your contribution! |
I've been trying to set this up for days: https://opentelemetry.io/docs/zero-code/php/.
Here's my
dockerfile
for PHP, built withdocker build --platform linux/amd64 -t phpbox -f dockerfile .
:and
index.php
and my Docker commands:
and I get this error:
Please help. The article doesn't give precise instructions with code and specific Docker images to reproduce the example they think should work.
The text was updated successfully, but these errors were encountered: