EightPointsGuzzleBundle
EightPointsGuzzleBundle copied to clipboard
[Profiler] Add detailed request time desc. (dns lookup, ...)
Based on #210:
More detailed request time description: dns lookup time, connection time, etc..
This sounds awesome, but where could we get that information? I've searched for a bit, but couldn't find anything on how to retrieve these timings from Guzzle.
@rpkamp sorry for long answer. I checked and found that in RequestTimeMiddleware
we're using on_stats
option from guzzle. There we receive TransferStats
object with handler stats info via getHandlerStats
and getHandlerStat
methods. That's an example of info:
Guzzle receives these info from curl getinfo
function: https://www.php.net/manual/en/function.curl-getinfo.php
Hope it will help you :slightly_smiling_face:
More info: https://github.com/8p/EightPointsGuzzleBundle/blob/master/src/Middleware/RequestTimeMiddleware.php#L63 http://docs.guzzlephp.org/en/stable/request-options.html#on-stats https://github.com/guzzle/guzzle/blob/master/src/TransferStats.php
Yeah, but how to access request time in symfony log middleware, for example, to put it in log context...