borges icon indicating copy to clipboard operation
borges copied to clipboard

Add meaningful log messages that can be searched in kibana

Open jfontan opened this issue 7 years ago • 0 comments

Current log messages do not offer enough information to debug malfunction or trends in repositories. Ideas of information that can be useful:

  • Time that it took each part of the download and total. Right now only some parts have this information.
  • Clearly define start and end of a job no matter its outcome. Messages are different for jobs with error and successful ones.
  • Add labels to messages to be easier to search. Now there's a msg with human readable data but it would be nice to also add easily parsable data:
{"endpoint":"git://github.com/dgreenhalgh/2010fwr","job":"01640b27-c7c4-0d83-0dc0-da776c9d9d22","level":"info","msg":"job finished successfully","source":"borges/archiver.go:113","time":"2018-10-17T09:59:32.484614868Z"}

{"label":"job-finished", "duration":1234, "success": true, "endpoint":"git://github.com/dgreenhalgh/2010fwr","job":"01640b27-c7c4-0d83-0dc0-da776c9d9d22","level":"info","msg":"job finished successfully","source":"borges/archiver.go:113","time":"2018-10-17T09:59:32.484614868Z"}
  • Join some spread information in one log line:
{"endpoint":"git://github.com/justindlea/datasharing","error":"push to rooted repo 1880dc904e1b2774be9c97a7b85efabdb910f974 failed: copy was cancelled","job":"01640b1f-8dc2-9d9f-5848-e209c33a49a4","level":"error","msg":"error pushing changes to rooted repository","root":"1880dc904e1b2774be9c97a7b85efabdb910f974","source":"borges/archiver.go:340","time":"2018-10-17T09:10:01.150989825Z"}
{"endpoint":"git://github.com/justindlea/datasharing","job":"01640b1f-8dc2-9d9f-5848-e209c33a49a4","level":"debug","msg":"repository processed","source":"borges/archiver.go:134","status":"pending","time":"2018-10-17T09:10:01.250793153Z"}
{"endpoint":"git://github.com/justindlea/datasharing","error":"repository processed with errors: archiving 1 out of 1 roots failed: 1880dc904e1b2774be9c97a7b85efabdb910f974","job":"01640b1f-8dc2-9d9f-5848-e209c33a49a4","level":"error","msg":"job finished with error","source":"borges/archiver.go:109","time":"2018-10-17T09:10:01.250880742Z"}

{"label": "job-finished", "duration": 1234, "success": false, "cause": "timeout acquiring lock", "root": "1880dc904e1b2774be9c97a7b85efabdb910f974", "endpoint":"git://github.com/justindlea/datasharing","error":"repository processed with errors: archiving 1 out of 1 roots failed: 1880dc904e1b2774be9c97a7b85efabdb910f974","job":"01640b1f-8dc2-9d9f-5848-e209c33a49a4","level":"error","msg":"job finished with error","source":"borges/archiver.go:109","time":"2018-10-17T09:10:01.250880742Z"}
  • Add file size information to copy messages

jfontan avatar Oct 17 '18 14:10 jfontan