Log unauthenticated API submissions
Description
Accept unauthenticated POSTs to /log
.
Accepts the following fields:
log_level: string/enum - restricted to python log level strings
event: string - limit length of event + data
data: dict[optional] - limit length of event + data
The following should be logged in addition to provided fields.
labels.log_type: string - always "remote"
labels.authenticated: bool - always false for now
trace_id - GCP reported value for API request (so API can be linked to front end request)
severity: log_level from request
remote_reported_event: as per request event
remote_reported_data: as per request data
Acceptance criteria
-
payload is limited to maximum accepted URLs length + agent length + headers etc. I.e. the maximum GCP balancer would log, thus limiting the log costs to 2x that of what GCP does already. -
uses ucam-observe to log to GCP -
uses fast api bootstrap -
container with single endpoint + health endpoint
Edited by Mike Knee