Closed tnolet closed 2 weeks ago
ext-opentelemetry
is installed, but perhaps not enabled ? Between the first and second step above, what is the output of php --ri opentelemetry
(or php -m | grep opentelemetry
) ?
@brettmc thanks for responding. Both comments show zero output, so that is probably the issue. I'm super new to PHP and I guess my Mac installation has some errors.
I fixed it. For those bumping into this issue, here's the cause and fix.
My php.ini
at vi ~Library/Application\ Support/Herd/config/php/82/php.ini
now looks as follows:
// other stuff
extension=/opt/homebrew/lib/php/pecl/20220829/opentelemetry.so
Running php --ri opentelemetry
however reports the extension is not found.
Solution. My terminal session was not initialized with a specific Herd env variable (HERD_PHP_82_INI_SCAN_DIR
) that points to the correct php.ini
Running source ~/.zshrc
fixed all of this.
timnolet@MacBook-Pro-van-Tim otel-laravel % php --ri opentelemetry
opentelemetry
opentelemetry hooks => enabled
extension version => 1.0.3
Directive => Local Value => Master Value
opentelemetry.conflicts => no value => no value
opentelemetry.validate_hook_functions => On => On
opentelemetry.allow_stack_extension => Off => Off
@brettmc this can be closed
Describe your environment
pecl
Steps to reproduce run
output:
What is the expected behavior? it installs with no version conflict.
What is the actual behavior? It errors out.
Additional context Add any other context about the problem here.