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
Opentelemetry not working with php version 7.1 in laravel #900
Comments
Hello @jbpal123 , are you getting any errors when trying to use the package within your Laravel 7.1 application? |
Hi @prondubuisi yes getting these errors Fatal error: Uncaught TypeError: Argument 2 passed to OpenTelemetry\SDK\Common\T TypeError: Argument 2 passed to OpenTelemetry\SDK\Common\Time\SystemClock::calcu |
@prondubuisi I followed steps mentioned in below url |
Note: versions of PHP prior to 7.4 are not officially supported. https://github.com/open-telemetry/opentelemetry-php#requirements |
It sounds like you're on a 32-bit platform: https://www.php.net/manual/en/function.hrtime.php#refsect1-function.hrtime-returnvalues (hrtime behaves differently on 32bit vs 64bit, and likely a bunch of other parts of open-telemetry as well). Are you able to reproduce this on a currently-supported PHP version ? |
Hi @bobstrecansky Once i run below command: I get bellow error: Potential causes:
|
@jbpal123 - the async-client-implementation is explicitly left to the end user, because there are many different options and implementations may have different needs. You should be able to satisfy that requirement with one of those packages listed. |
Hi All, Fatal error: Uncaught TypeError: OpenTelemetry\SDK\Common\Time\SystemClock::calc TypeError: OpenTelemetry\SDK\Common\Time\SystemClock::calculateReferenceTime(): further more |
Thanks for the additional information! |
Hi @brettmc As per the https://opentelemetry.io/docs/instrumentation/php/getting-started/ doc, I should get some json data as output. |
Yes, you should see some JSON data. The example works for me, so my guess is that this is a windows-specific problem, likely an output stream issue (ie, its sending the output to somewhere that's not valid in windows, or at least not visible to you). The "ConsoleSpanExporter" attempts to write to $tracerProvider = new TracerProvider(
new SimpleSpanProcessor(
(new \OpenTelemetry\SDK\Trace\SpanExporter\ConsoleSpanExporter(
new \OpenTelemetry\SDK\Common\Export\Stream\StreamTransport(
fopen('php://output', 'ab'),
'application/json'
)))
)
); This is slightly different to what the original factory code does:
|
Closing due to inactivity. @jbpal123 feel free to reopen or submit a new issue. |
I tried to integrate opentelemetry in php 7.1 project in laravel. But its not working. Can anyone provide me steps how to properly integrate opentelemetry in php 7.1 or lower version projects created using laravel?
The text was updated successfully, but these errors were encountered: