Storage

Logs


Accessing the Storage Logs allows you to examine all incoming request logs to your Storage service. You can also filter logs and delve into specific aspects of your requests.

Common log queries

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;