Open
Description
🚀 Feature Proposal
It might be really useful for debugging purposes to include response time as part of DiagnosticResult
.
Motivation
Solving the problem in the user-land is not the best DX.
We can start with something simple - a time between a request method was called and a response from ES is fully received. Later, we can introduce a more detailed explanation for different phases - DNS lookup, TLS handshake, etc.
Example
client.on('....', (error, event) => {
console.log(`request to ${event.meta.request.path} took ${event.meta.took} ms`)'
});
await client.search(....)