hapijs / good

hapi process monitoring
Other
525 stars 160 forks source link

responseTime should not include tail time #530

Closed kevinmstephens closed 7 years ago

kevinmstephens commented 7 years ago

responseTime should represent the difference between request received and response sent.

Currently, when a tail is used and log event is tail then responseTime includes the time taken for the tail to complete.

https://github.com/hapijs/good/blob/master/lib/utils.js#L71

Recommend changing to this.responseTime = request.info.responded || Date.now() - request.info.received;

arb commented 7 years ago

I'll take a PR.

lock[bot] commented 4 years ago

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.