For App Engine (Python, Standard environment), I have created a log-export (v2) in the same project as the app. Destination of the sink is a dataset in Google BigQuery.
I can perform some simple queries in BigQuery:
SELECT
severity,
timestamp AS Time,
protoPayload.host AS Host,
protoPayload.status AS Status,
protoPayload.resource AS Path,
httpRequest.status,
httpRequest.requestMethod,
httpRequest.userAgent,
httpRequest.remoteIp
FROM
[MY_PROJECT:MYLOGS.appengine_googleapis_com_request_log_20170214]
LIMIT
10
While httpRequest.status
will be shown in the results with values (and the same for all the other selected fields), other fields of httpRequest
are shown with null
, e.g.: requestMethod
, userAgent
, remoteIp
.
On the Cloud Log web page, I can see these log entries and these values are existing, but it seems that they are not exported to BigQuery.
When I try to filter by the request method to be GET
, e.g.:
SELECT
severity,
timestamp AS Time,
protoPayload.host AS Host,
protoPayload.status AS Status,
protoPayload.resource AS Path,
httpRequest.status,
httpRequest.requestMethod,
httpRequest.userAgent,
httpRequest.remoteIp
FROM
[MY_PROJECT:MYLOGS.appengine_googleapis_com_request_log_20170214]
WHERE
httpRequest.requestMethod = 'GET'
LIMIT
10
This query will return zero records.
Any idea, why some fields are not shown in queries and cannot be used for filters in BigQuery?