Websocket logging
We want to collect logging data from the web browser and store it in case the
operator needs it later.
The GUI already takes advantage of the Zaqar messaging system which transfers
messages between the server and the client via websockets. We can use this to
send logging messages to the server. We can create a new Zaqar queue called
*tripleo-logging* and send everything there.
The javascript application should send any useful information to the server, for
example:
* redux action messages
* exception tracebacks
* useful console.log calls
* route changes
As part of the implementation of this feature, we could
* register a global *onerror* handler which catches all exceptions, logs them
and re-raises the original exception (this is what the sentry javascript
client does)
* monkey-patch the *console.** functions (log, warn, debug, etc) to use the new
logging mechanism
* convert all immutable.js data structures to plain javascript before sending
On the other side of the Zaqar queue, we shall create a simple Python script
which will be run periodically by a cronjob. This script will drain the Zaqar
queue and append the messages to a log file on disk. We can then create an
httpd vhost which would allow the client to retrieve this log file and make it
available to the user for viewing.
Blueprint information
- Status:
- Complete
- Approver:
- Emilien Macchi
- Priority:
- High
- Drafter:
- Honza Pokorny
- Direction:
- Approved
- Assignee:
- Honza Pokorny
- Definition:
- Approved
- Series goal:
- Accepted for pike
- Implementation:
- Implemented
- Milestone target:
- pike-rc2
- Started by
- Emilien Macchi
- Completed by
- Emilien Macchi
Related branches
Related bugs
Sprints
Whiteboard
[jpichon 2016-11-07] This needs to be updated and moved to the TripleO tracker.
Gerrit topic for the patches already submitted at https:/
Spec proposed at https:/
Gerrit topic: https:/
Addressed by: https:/
Implement Zaqar logger adapter
Addressed by: https:/
Download logs interface
Addressed by: https:/
Add GUI logging workflows
Addressed by: https:/
Add logging documentation
Addressed by: https:/
Add an hourly cron trigger for tripleo-ui logging
Addressed by: https:/
Publish logs before exporting them
Addressed by: https:/
Don't log app state in Zaqar by default
Addressed by: https:/
Add an hourly cron trigger for tripleo-ui logging