-
Notifications
You must be signed in to change notification settings - Fork 22
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
Logging Worker Execution Times Only if Limit Exceeded #1604
Conversation
Removing execution time for given worker in removeTimeIfInWarnMargin function to track only workers that exceed allowed margin time. Added additional workerLastKeys map to keep worker keys for logging in worker summary go routine.
Add one of following labels |
|
||
processingTime := time.Since(processingStart) | ||
|
||
if processingTime > q.warnAfterTime { |
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.
Will we log here information when the worker is idle?
In case there is nothing in the queue to process for a long time so the last execution time (in q.workerExecutionTimes[workerNameId]
is very old.
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.
In the case the time from workerExecutionTimes
is removed in https://github.com/kyma-project/kyma-environment-broker/pull/1604/files#diff-e94ea6ee51e7a52f24c56388c5828851ee956a6cb5d30cf83a6a82cef2f7784cR119 before a chance to log it hence not producing idle logs.
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.
Iddle logs were produced in the healthcheck go routine.
Remove times only one time in the code.
Removing execution time for given worker in removeTimeIfInWarnMargin function to track only workers that exceed allowed margin time. Added additional workerLastKeys map to keep worker keys for logging in worker summary go routine.
Description
Changes proposed in this pull request:
Related issue(s)
#1473