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

Measure latency/request duration and provide it for logging purpose #235

Open
SirSova opened this issue Aug 29, 2024 · 0 comments
Open

Measure latency/request duration and provide it for logging purpose #235

SirSova opened this issue Aug 29, 2024 · 0 comments

Comments

@SirSova
Copy link

SirSova commented Aug 29, 2024

Right now it's hardly possible to get an attempt latency for a log like "request failed after 300ms, attempts: 3".
It's quite important to know how much time was actually spent per each request, since the external service can abort it at any moment. And in case the backoff didn't help -- to know the total duration in the default error within the number of attempts.

Ideally, ResponseLogHook could be extended with more arguments like attemptsNumber, attemptLatency (last one), totalLatency (sum of all attempts + delays)
All of it can be structured under some "Details" structure.

For ErrorHandler it could also be useful to have the final total latency.

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