Files
Saxon FletcherandClaude Opus 5 32341830b3 docs: organize observability by task and move SQL logs to Explorer (#50074)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

Yes.

## What kind of change does this PR introduce?

Documentation update.

## What is the current behavior?

The observability overview and access page overlap; configuration
interrupts querying; related guides send log queries to the old editor.

## What is the new behavior?

The observability overview and navigation follow the same four sections:
Read project data, Detect and diagnose, Hire an agent, and Configure and
export. The overview absorbs the redundant access page, with permanent
redirects for both HTML and Markdown URLs.

“Query logs with SQL” owns ClickHouse querying through MCP, the
Management API, and Explorer with query source Logs. Logging
configuration moves to its own guide; sources, captured headers, and
limits live in the field reference. Inspection links to canonical
diagnostic SQL. Related Storage and database guides use the replacement
Explorer workflow and retain existing anchors where headings move.

## Additional context

Validation: Markdown generation, docs typecheck, targeted ESLint,
formatting, and content-listing tests. Browser overview/navigation
checked; old HTML and Markdown URLs return 308, and the new
configuration page returns 200 in both formats. Three ClickHouse
examples and the Postgres configuration query ran in a disposable
container sandbox. Changed pages have no MDX lint violations;
repository-wide existing failures remain.

Self-review: the Management API request was verified against its
published schema but not sent to a hosted project. Realtime ingestion
and hosted logging configuration still need a hosted smoke check. No
compatibility path for the deprecated logs engine is documented.

Stage 2 of 3; depends on stage 1.


Stack: #50073 → #50074 → #50075.

Production docs build also passes at the stack tip after standard
reference generation.



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Documentation**
- Reorganized observability guidance around reading data, detecting
issues, diagnosing problems, agent setup, and exporting data.
  - Added a guide for configuring Postgres and Realtime logging.
- Updated log investigation instructions to use Explorer, SQL queries,
and clearer filters.
  - Added log source, field, and captured-header references.
  - Improved advisor guidance and database performance troubleshooting.
  - Added redirects for moved observability content.

- **Accessibility**
- Improved screen-reader labels for copy and feature-selection controls.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-16 17:03:43 +10:00

75 lines
2.1 KiB
Plaintext

---
id: 'storage-logs'
title: 'Logs'
description: 'Learn how to check Storage Logs'
sidebar_label: 'Debugging'
---
Open [Logs](/dashboard/project/_/logs) and select **Storage** as the log type to inspect Storage service events. Filter by time and event message to find a request.
For more advanced filtering needs, use the [Explorer](/dashboard/project/_/explorer) after selecting **Run SQL**, query source **Logs**, and a time range to query the Storage logs directly. A Logs query runs ClickHouse SQL rather than Postgres SQL. Every log line is a row in the `logs` table, tagged by a `source` column, with structured fields in a `log_attributes` map.
<Admonition type="note">
For more details on filtering the log tables, see [Query logs with SQL](/docs/guides/observability/advanced-log-filtering)
</Admonition>
## Example Storage queries
### Filter by status 5XX error
```sql
select
id,
timestamp,
event_message,
toInt32OrZero(log_attributes['res.statusCode']) as statusCode,
log_attributes['error.message'] as errorMessage,
log_attributes['error.raw'] as rawError
from logs
where source = 'storage_logs'
and toInt32OrZero(log_attributes['res.statusCode']) >= 500
order by timestamp desc
limit 100;
```
### Filter by status 4XX error
```sql
select
id,
timestamp,
event_message,
toInt32OrZero(log_attributes['res.statusCode']) as statusCode,
log_attributes['error.message'] as errorMessage,
log_attributes['error.raw'] as rawError
from logs
where source = 'storage_logs'
and toInt32OrZero(log_attributes['res.statusCode']) between 400 and 499
order by timestamp desc
limit 100;
```
### Filter by method
```sql
select id, timestamp, event_message, log_attributes['req.method'] as method
from logs
where source = 'storage_logs'
and log_attributes['req.method'] in ('POST')
order by timestamp desc
limit 100;
```
### Filter by IP address
```sql
select id, timestamp, event_message, log_attributes['req.remoteAddress'] as remoteAddress
from logs
where source = 'storage_logs'
and log_attributes['req.remoteAddress'] in ('IP_ADDRESS')
order by timestamp desc
limit 100;
```