-
Notifications
You must be signed in to change notification settings - Fork 81
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
Problem with generateId on macOS PHP 7.0, 7.1 #86
Comments
I got the error when I install PHP 7.0.33 and 7.1.33 on my macOS.
In that case, I can't fix the issues whick you created. I suggest you upgrade PHP version |
Thanks, do you see a way how to generate IDs a little bit differently to work around the issue? |
it doesnt work for PHP 7.4 on CentOS 8.3 as well
so the most quickest fix with the same logic is to convert float to int explicitly
so the function will be
but you can use this one instead, which in my opinion is even better
|
I have a weird problem which seems to only affect PHP versions (of MAMP) on macOS where the trace ID is always
10000000000000001
. I have tested with 7.0.33 and 7.1.32, both have the issue. 7.2.22 is not affected. Also other operating system versions (at least Alpine Linux and Debian) are seemingly not affected.Jaeger
has the methodIn the mentioned environments this produces e.g.
1.58375696973E+1330420
a very large number that cannot be processed. It seems that on that systemsmicrotime(true) * 10000
is in exponent notation1.58375693969E+13
and then therand
part is concatenated to the exponent yielding that large number.On not affected systems the output is the correct e.g.
1583757054325111449
.I have tried to work around the problem but I don't know enough about how trace IDs have to be composed. I get a lot of zeros in the middle which then show up in JaegerUI too.
Do you see the possibility of modifying the method to work around that PHP bug (or whatever it is) on the mentioned systems?
The text was updated successfully, but these errors were encountered: