-
Notifications
You must be signed in to change notification settings - Fork 197
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
improve api call actions logs #4239
Conversation
Maybe you should check also in the |
Checked. No occurrence |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System test passed.
The base branch was changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
System test passed
const thresholdMinAPICallDurationToLog = 200 * time.Millisecond | ||
|
||
// LogAPIActionDurationIfNeeded will log the duration of an action triggered by an API call if it's above a threshold | ||
func LogAPIActionDurationIfNeeded(startTime time.Time, action string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no unit tests for this
before this PR, all durations of certain API actions would have been logged. this PR unifies the logging via a single function which only logs if the duration is above a threshold