Skip to content

DiagnosticResult includes request duration #35

Open
@mshustov

Description

@mshustov

🚀 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(....)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions