Storage

Logs


The Storage Logs provide a convenient way to examine all incoming request logs to your Storage service. You can filter by time and keyword searches.

For more advanced filtering needs, use the Logs Explorer to query the Storage logs dataset directly. The Logs Explorer is separate from the SQL Editor and uses a subset of the BigQuery SQL syntax rather than traditional SQL.

Example Storage queries for the Logs Explorer

Filter by status 5XX error

1
select
2
id,
3
storage_logs.timestamp,
4
event_message,
5
r.statusCode,
6
e.message as errorMessage,
7
e.raw as rawError
8
from
9
storage_logs
10
cross join unnest(metadata) as m
11
cross join unnest(m.res) as r
12
cross join unnest(m.error) as e
13
where r.statusCode >= 500
14
order by timestamp desc
15
limit 100;

Filter by status 4XX error

1
select
2
id,
3
storage_logs.timestamp,
4
event_message,
5
r.statusCode,
6
e.message as errorMessage,
7
e.raw as rawError
8
from
9
storage_logs
10
cross join unnest(metadata) as m
11
cross join unnest(m.res) as r
12
cross join unnest(m.error) as e
13
where r.statusCode >= 400 and r.statusCode < 500
14
order by timestamp desc
15
limit 100;

Filter by method

1
select id, storage_logs.timestamp, event_message, r.method
2
from
3
storage_logs
4
cross join unnest(metadata) as m
5
cross join unnest(m.req) as r
6
where r.method in ("POST")
7
order by timestamp desc
8
limit 100;

Filter by IP address

1
select id, storage_logs.timestamp, event_message, r.remoteAddress
2
from
3
storage_logs
4
cross join unnest(metadata) as m
5
cross join unnest(m.req) as r
6
where r.remoteAddress in ("IP_ADDRESS")
7
order by timestamp desc
8
limit 100;