-
Notifications
You must be signed in to change notification settings - Fork 5
Logging
various log points are provided to catch the following:
I only run Shoryuken logging for debugging purposes as the file(s) get large very fast.
bundle exec shoryuken -r ./ledbelly -C cfg/sqs.yml -L log/shoryuken.log
bundle exec shoryuken -r ./ledbelly -C cfg/sqs.yml -L log/shoryuken.log -d
Shoryuken log file will contain backtrace errors for code problems.
A clean Shoryuken log looks like this, with message started and completed status
2019-10-04T16:21:10Z 23394 TID-oxh9bfgh8 INFO: Starting
2019-10-04T16:21:10Z 23394 TID-oxh9ezycc LiveEvents/queue-name/message-id-11bea56e97b6 INFO: started at 2019-10-04 09:21:10 -0700
2019-10-04T16:21:10Z 23394 TID-oxh9c34to LiveEvents/queue-name/message-id-3de7ff40f95e INFO: started at 2019-10-04 09:21:10 -0700
2019-10-04T16:21:10Z 23394 TID-oxh9c3hzk LiveEvents/queue-name/message-id-969f986583f6 INFO: started at 2019-10-04 09:21:10 -0700
2019-10-04T16:21:10Z 23394 TID-oxh9c3frk LiveEvents/queue-name/message-id-531828b2cb7d INFO: started at 2019-10-04 09:21:10 -0700
2019-10-04T16:21:10Z 23394 TID-oxh9c3318 LiveEvents/queue-name/message-id-76191a87feb1 INFO: started at 2019-10-04 09:21:10 -0700
2019-10-04T16:21:11Z 23394 TID-oxh9ezycc LiveEvents/queue-name/message-id-11bea56e97b6 INFO: completed in: 402.559 ms
2019-10-04T16:21:11Z 23394 TID-oxh9c34to LiveEvents/queue-name/message-id-3de7ff40f95e INFO: completed in: 400.55 ms
2019-10-04T16:21:11Z 23394 TID-oxh9c3frk LiveEvents/queue-name/message-id-531828b2cb7d INFO: completed in: 407.224 ms
2019-10-04T16:21:11Z 23394 TID-oxh9c3318 LiveEvents/queue-name/message-id-76191a87feb1 INFO: completed in: 408.82 ms
Logger, can be enabled in ledbelly.rb for the database connection. This will log every transaction by day. The files will become huge. It's disabled by default and provided for debugging purposes.
SQL Errors land here, sometimes caused by code alignment, or mostly connection/db host failures. The log will contain the event name, the error, the SQL statement that failed, and the JSON and HASH values of the event message.
The INSERTS from of the sql-errors.log
String value before insert is longer than defined. The string will be truncated to the defined length, accounting to multi-byte strings/storage. Use this to update lib/schemas files.
ddl-warnings.log
ddl-undefined.log
Both files, If an event was received with more columns that we have defined, the log will contain the list of new fields we need to add to the event parser code and schema.
When LEDbelly unexpectedly receives an event type that is not defined in the parser (and schema), it will store the JSON event string in this file. There is currently no way to recover these events with the given tasks, they are stored for evaluation purposes to update the code to handle future messages for that event.
Alternatively, these payloads can be stored in a secondary moo queue. https://github.com/ccsd/ledbelly/blob/master/src/ledbelly_worker.rb#L155
If there is interest in parsing these cached events into the database, we can evaluate the need for a future rake task.