-
Notifications
You must be signed in to change notification settings - Fork 1
Improved logging #609
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
Improved logging #609
Conversation
…. Added new log file on new experiment
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.
Wow - thanks for going through all this. Painstaking but long-needed. It looks good to me.
- One thing to add to Grafana and which requires no changes to this PR
- We currently output the net FPS of an experiment
self.logger.info(f"Net FPS is {self.frame_count/runtime:.1f}")
. - A sudden change in net FPS could alert us to other issues (say due to a performance regression in a recent PR, or some other issue with the scopes - maybe running too hot and building up queues, slow SSD, etc.)
Aside, the one comment I made on ewma_filtering_utils.py
is unrelated to the contents of this PR, I'll submit a separate one to fix that minor bug.
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.
Setup script looks good!
…oki, added experimentID to log to compensate.
skip = not clinical and not sample_type == CULTURED_SAMPLE | ||
if skip: |
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.
NBD but definitely more confusing that necessary. Could be:
if sample_type not in (CLINICAL_SAMPLE, CULTURED_SAMPLE):
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.
I agre, I will change that in another pull request but I want to keep this specific to logging.
return min_duty_cycle, max_duty_cycle, step_size | ||
except Exception as e: | ||
self.logger.exception( | ||
self.logger.error( |
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.
Is there a reason you converted some of these instances to logger.error()
and some to logger.exception()
? AFAIK the only difference is whether the stack is included by default or not.
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.
I converted all exceptions to errors so I believe there should be no logger.exceptions left. Previously, the severity levels were inconsistent so I tried to simplify things and keep more consistency in our severity level choices. Since we are also receiving alerts for tracebacks, I want them to be serious and not send us notifications for exceptions like the syringe being at its end of travel which tends to happen every run.
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.
ah ok. I thought I had seen one the other way around but I was wrong!
Aside from minor comments above, looks good to me! |
Thanks for the review! I will merge it in. |
Made a few logging changes: