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

feat: add logging of latency to both error and success messages #27

Closed
wants to merge 1 commit into from

Conversation

kribor
Copy link

@kribor kribor commented Nov 18, 2024

No description provided.

_since(res.req.started),
retryAttempt && `try#${retryAttempt + 1}/${req.retry.count + 1}`,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change of order for consistency with error message and ease of parsing

Copy link
Member

@kirillgroshkov kirillgroshkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, you're proposing to make 2 changes:

  1. change the order of the log message on response

  2. change the err.message to include the latency information

Number 2 is user-facing, BTW, so it'll be a change in what users see in the Frontends (among other places).

My quick feedback is that, while the changes are not so significant at the first look, in my head the motivation of the change doesn't align with the change itself. E.g "because we want the message to be better parse-able - I'd like to change how we log it".
I want to argue that these plain text messages are not intended for the automatic consumption/parsing in the first place, we might use structured logging for these cases instead.

So, I want to open a slack discussion and propose another solution, such as a hook, that would allow for structured logging that is independent of "default/user-facing logging".

@kribor kribor closed this Nov 20, 2024
@kribor kribor deleted the DEV-20024 branch November 20, 2024 16:42
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

Successfully merging this pull request may close these issues.

2 participants