Add structured API request debug logging
Add a new "ApiRequest" PSR-3 logging channel for messages that describe
an Action API request as structured data. This logging channel can be
routed to a storage service to facilitate analysis of the requests.
The logging context is designed to match the following avro schema:
{
"type": "record",
"name": "ApiRequest",
"namespace": "org.wikimedia.mediawiki.api",
"doc": "Describes an API request made via mediawiki ApiMain",
"fields": [
{ "name": "dt", "type": "string" },
{ "name": "client_ip", "type": "string" },
{ "name": "user_agent", "type": "string" },
{ "name": "wiki", "type": "string" },
{ "name": "time_backend_ms", "type": "int" },
{ "name": "params", "type": {
"type": "map", "values": "string"
} }
]
}
Co-Author: Bryan Davis <bd808@wikimedia.org>
Bug: T108618
Change-Id: I38f5cdb288f332f75adca8a2d03fbe0fc36ab936