Skip to content
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

Trace should use monotonic time when available in PHP #755

Closed
wsh opened this issue Nov 21, 2017 · 2 comments
Closed

Trace should use monotonic time when available in PHP #755

wsh opened this issue Nov 21, 2017 · 2 comments
Assignees
Labels
api: cloudtrace Issues related to the Cloud Trace API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@wsh
Copy link
Contributor

wsh commented Nov 21, 2017

Right now, it calls microtime(), which is not guaranteed to be monotonic. This could result in bogus measurements because of NTP-introduced clock skew etc.

https://github.com/GoogleCloudPlatform/google-cloud-php/blob/3f9def8696d50201d1f79a1d68a63f908cf113b3/src/Trace/Tracer/ContextTracer.php#L88

One PR that would implement this for PHP is here: php/php-src#2368

@dwsupplee dwsupplee added api: cloudtrace Issues related to the Cloud Trace API. type: question Request for information or clarification. Not an issue. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. priority: p2 Moderately-important priority. Fix may not be included in next release. and removed type: question Request for information or clarification. Not an issue. labels Nov 22, 2017
@jdpedrie
Copy link
Contributor

jdpedrie commented Dec 6, 2017

Moving this to the new Feature Request wiki page.

@jdpedrie jdpedrie closed this as completed Dec 6, 2017
@jdpedrie
Copy link
Contributor

FYI: hrtime() coming in PHP 7.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: cloudtrace Issues related to the Cloud Trace API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants