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

DiagnosticResult includes request duration #35

Open
mshustov opened this issue Jan 17, 2022 · 2 comments
Open

DiagnosticResult includes request duration #35

mshustov opened this issue Jan 17, 2022 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mshustov
Copy link
Contributor

🚀 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(....)
@ArchitGajjar
Copy link

HI @JoshMock - Can I work on this issue ? this will be my first contribution to this project ? Thank you very much!

@JoshMock
Copy link
Member

Absolutely @ArchitGajjar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants