logging-monitoring-instrumentation
A brief repository on logging monitoring and instrumentation in Python
Items for you to solve
- Toggle log levels from debug to info to etc using config file (try also creating and catching exceptions)
- Add a file handler and emit logs to a file
- Use the
python-json-logger
and convert log message to a JSON format: https://github.com/madzak/python-json-logger
Next Steps
- Convert Daemon to click command-line tool and let
--level
be set via a flag. - Run Daemon to background with
python daemon.py &
# what happens? - Run Daemon to background with
python daemon.py &
the typefg
# what happens? Can you kill it? - Run Daemon in
screen
and detach and reattach. - Can you use a Daemon library? Is this better?
Dashboard Next Steps
- Send the output of the daemon to AWS: Cloudwatch, SNS, Kinesis, etc
- Dashboard your daemon output by counting the occurrences
- Log via an AWS Compute Unit: AWS Lambda, ECS or App Runner
- Use someform of tracing and trace code: X-Ray/
strace
etc. What doesstrace
do?