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
HBASE-24367 ScheduledChore log elapsed timespan in a human-friendly format #1749
Conversation
Log the elapsed time in milliseconds, which operators will be more used to dealing with than nanosecond measures. Remove the log lines for the average time, which is not interesting, and can be derived from logs using any of the common solutions for log scraping that operators will use. Log at DEBUG level instead of INFO. I agree with @ndimiduk that a histogram might be better, but it should be exported as a real metric, not dumped in logs, in that case. Added a TODO in that regard. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
chore(); | ||
return null; | ||
}); | ||
if (LOG.isInfoEnabled() && (System.nanoTime() - lastLog > FIVE_MINUTES_IN_NANOS)) { |
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.
Do we want some duration threshold that triggers escalating the log level to info (or warn), as was done before?
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.
Not opposed to the idea at all, but it's going to depend on the chore, right?
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.
yeah i think you're right. let's leave it for now.
My original thinking was that we'd want to log a time with dynamic units, calculated based on the magnitude of the value. Your argument for logging durations using a fixed unit, one that can be automatically extracted by log indexing system, is a good one. Maybe one day we'll have a structured logging implementation that can accommodate both use cases. |
You have a new patch for us, master @apurtell ? |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
No new patch yet. Sorry, have been away doing other things. Apologies for the noise after rebase. |
Push just now addresses review feedback and fixes the checkstyle warning. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
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.
LGTM, +1
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.
+1
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.
+1
…ormat (#1749) Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> Signed-off-by: Guanghao Zhang <zghao@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
…ormat (#1749) Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> Signed-off-by: Guanghao Zhang <zghao@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
…ormat (#1749) Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> Signed-off-by: Guanghao Zhang <zghao@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
…ormat (apache#1749) Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> Signed-off-by: Guanghao Zhang <zghao@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
…ormat (apache#1749) Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> Signed-off-by: Guanghao Zhang <zghao@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
…ormat (apache#1749) Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> Signed-off-by: Guanghao Zhang <zghao@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org>
…ormat (apache#1749) Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> Signed-off-by: Guanghao Zhang <zghao@apache.org> Signed-off-by: Viraj Jasani <vjasani@apache.org> (cherry picked from commit a5a45e8) Change-Id: Iafa735e50353b5fa07a3c79d2747a7cb18320082
No description provided.