octue / django-gcp

Everything required to run Django on GCP (storage, pubsub events, tasks, logging, errors)
Other
21 stars 3 forks source link

Improve `httpRequest` structured log entry #25

Open thclark opened 1 year ago

thclark commented 1 year ago

Feature request

Use Case

Basic httpRequest information is added to the GoogleStructuredLogHandler. However, this data could be much richer, as many fields are missing.

Current state

Inspecting the record.request object in the test server gives me a socket connection, not an HTTPRequest object. I don't know why; there's no ASGI server set up or anything and the same happens in debug and production mode. If anyone cares to:

Especially if at the same time you:

... then PRs are most welcome!