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

Metrics that matters #14

Open
danish-cashify opened this issue Dec 5, 2023 · 0 comments
Open

Metrics that matters #14

danish-cashify opened this issue Dec 5, 2023 · 0 comments

Comments

@danish-cashify
Copy link

How about we add some metrics that matters?
Often people wanna know which component took most of the time when a request gets stalled or if a request is taking more time:

  • in development phase of a listing api
  • in maintenance phase of a listing api
    Speaking in terms of this package as everything is broken down into components we can decide to log time component wise.

client request passes through all the components and we can log the difference between entry & exit time.

The major impact will come at pagination level when data actually gets allocated into the memory as the listing query hits sql server at this stage. Other than this in filters we hit sql server for validation purposes which is kinda depend on the stuff or params that we are receiving.

standard unit of time - milliseconds

A standard chart could like something like this

Request enters at: 2023-12-05 13:09:00(1234567890)(unix time)
|
|Prepare Query: 0.1 ms
|
___ using xyz strategy listing query received in 0.03ms
|____ query filters applied in 0.06ms (this should expand in case of multiple filters)
|____ query sorting applied in 0.01ms (this should expand in case of multiple sort)
|Paginator: 5ms
|
___ query hits sql at: 2023-12-05 13:09:01(1234567890)(unix time)
|____ sql response returned in 5ms
Request exist at: 2023-12-05 13:09:06(1234567890)(unix time)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant