Open Bug 1908156 Opened 1 year ago Updated 1 year ago

improve logging during upload handling

Categories

(Tecken :: Upload, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: willkg, Unassigned)

Details

When using the upload API, if I upload a single symbols file, Tecken logs the following (ignoring markus lines):

tecken-web-1         | DEBUG 2024-07-16 14:07:57,531 - webapp - tecken Uploading file 'libxul.so/1CF2690D9BA439783C1CB316CDFCCBD60/libxul.so.sym' into 'publicbucket'
tecken-web-1         | INFO 2024-07-16 14:07:58,674 - webapp - tecken Uploaded key libxul.so/1CF2690D9BA439783C1CB316CDFCCBD60/libxul.so.sym
tecken-web-1         | INFO 2024-07-16 14:07:58,675 - webapp - tecken Created 1 FileUpload objects
tecken-web-1         | INFO 2024-07-16 14:07:58,776 - webapp - request.summary 
tecken-web-1         | 172.18.0.12 - - [16/Jul/2024:14:07:58 +0000] "POST /upload/ HTTP/1.1" 201 293 "-" "tecken-upload-sym"

This isn't wildly helpful. The first two lines are effectively the same. We never find out if it completed the upload. We don't know anything about how big the file is. What does "request.summary" mean?

This line is in a completely different format:

tecken-web-1         | 172.18.0.12 - - [16/Jul/2024:14:07:58 +0000] "POST /upload/ HTTP/1.1" 201 293 "-" "tecken-upload-sym"

I'm guessing that that's coming from gunicorn and not Django.

Also, when Tecken is handling multiple upload requests at the same time, it'd help to be able to isolate all the log messages for a single upload request. We could do this by creating including a unique upload identifier and including that in all the log messages. We could switched to structured logging, too.

We should improve this so that logging has more information that helps us debug upload issues.

Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.