You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The X-Request-Time header is in milliseconds, but the PHP code then does a divide by 10000, and uses microtime to compare against it, which I don't think matches up.
The current code:
The header value comes in as milliseconds since epoch. To simplify, assume we're in 1970 and say "2".
The code divides that number by 10000, so it's 0.0002
Then it gets the start time as microseconds, say 3000 (3 milliseconds after epoch)
The final value is then (3000 - 0.0002) * 1e9 = 2.999e12 nanoseconds. Which is ~50 minutes.
The X-Request-Time header is in milliseconds, but the PHP code then does a divide by 10000, and uses microtime to compare against it, which I don't think matches up.
The current code:
The expected value is:
Because of the subtraction, epoch cancels out.
https://github.com/scoutapp/scout-apm-php/blob/master/src/Events/Request/Request.php#L95-L96
https://devcenter.heroku.com/articles/http-routing#heroku-headers
The text was updated successfully, but these errors were encountered: