Skip to content

docs(telemetry): add a Debugging guide and log-query best practices - #47762

Merged
jordienr merged 20 commits into
masterfrom
docs/logs-explorer-querying-guide
Jul 10, 2026
Merged

docs(telemetry): add a Debugging guide and log-query best practices#47762
jordienr merged 20 commits into
masterfrom
docs/logs-explorer-querying-guide

Conversation

@jordienr

@jordienr jordienr commented Jul 9, 2026

Copy link
Copy Markdown
Member

Two related docs changes for debugging Supabase, consolidated into one PR.

1. New "Debugging" guide (guides/telemetry/debugging)

A methodology and entry page for debugging any Supabase issue, added next to Logging in the Telemetry nav. It covers:

  • The debugging loop — read the exact error, isolate the failing layer, gather evidence, fix, verify.
  • The Supabase request stack — the gateway fans out to PostgREST, GoTrue, Storage, and Realtime as parallel services (not a chain), with Postgres underneath. Explains why an API-layer permission or empty-result error is usually a Postgres RLS/privilege issue.
  • Reading logs — the narrow-query discipline (one source, bounded window, widen along an anchor), linking the Logs Explorer guide rather than duplicating query syntax.
  • Symptom to guide routing table — maps each symptom to its layer and the specific troubleshooting guide, acting as a front door to the troubleshooting collection. All 47 links verified live.

This puts the debugging methodology in docs (owned and updatable) instead of only in the agent skill.

2. Log-query best practices (guides/telemetry/logs)

Adds the three practices the existing Best practices list was missing, all engine-agnostic: query one source at a time, follow a request across sources with an anchor, and reference only confirmed field names.

Follow-up (not in this PR)

The Logs Explorer now defaults to ClickHouse (single logs table, log_attributes map), but guides/telemetry/logs.mdx and the two logs troubleshooting guides still document the legacy BigQuery dialect (cross join unnest(metadata)). They need a coordinated BigQuery to ClickHouse migration pass:

  • guides/telemetry/logs.mdx
  • troubleshooting/how-to-interpret-and-explore-the-postgres-logs-OuCIOj.mdx
  • troubleshooting/discovering-and-interpreting-api-errors-in-the-logs-7xREI9.mdx

Summary by CodeRabbit

  • New Features

    • Added a new “Debugging” guide with a step-by-step workflow for identifying where issues originate versus where they appear.
    • Added a symptom-to-layer troubleshooting mapping and linked it from Telemetry navigation.
  • Documentation

    • Updated Logs Explorer guidance to note its ClickHouse default and that examples use legacy BigQuery syntax.
    • Expanded Logs Explorer best practices, including querying one source at a time, correlating with anchors, and using only confirmed field names.

Documents the narrow-query discipline (filter by table, bound the
timestamp, select only needed columns, widen along an anchor) and the
Logs Explorer's BigQuery SQL restrictions (no subqueries, no *, no
ILIKE, cross join unnest for nested fields). Complements the existing
per-source Postgres and API log guides with the discipline that
applies across every log source.
@supabase

supabase Bot commented Jul 9, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project xguihxuzqibwxjnimxev because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment, Open in v0 Jul 10, 2026 11:18am
6 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Jul 10, 2026 11:18am
design-system Skipped Skipped Jul 10, 2026 11:18am
studio-self-hosted Skipped Skipped Jul 10, 2026 11:18am
studio-staging Skipped Skipped Jul 10, 2026 11:18am
ui-library Skipped Skipped Jul 10, 2026 11:18am
zone-www-dot-com Skipped Skipped Jul 10, 2026 11:18am

Request Review

@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 2038f1d4-9b6e-4dab-a1f6-a3a1649bb62a

📥 Commits

Reviewing files that changed from the base of the PR and between 0143177 and 1a07983.

📒 Files selected for processing (1)
  • apps/docs/content/guides/telemetry/debugging.mdx
✅ Files skipped from review due to trivial changes (1)
  • apps/docs/content/guides/telemetry/debugging.mdx

📝 Walkthrough

Walkthrough

Added a telemetry Debugging documentation page, linked it from navigation, expanded Logs Explorer guidance for targeted investigation and cross-source correlation, and allowed a documented Auth error token in the spelling rule.

Changes

Telemetry debugging documentation

Layer / File(s) Summary
Logs Explorer query practices
apps/docs/content/guides/telemetry/logs.mdx
Adds ClickHouse and legacy BigQuery syntax context, single-source querying, anchor-based correlation, and field-name verification guidance.
Debugging guide content
apps/docs/content/guides/telemetry/debugging.mdx, supa-mdx-lint/Rule003Spelling.toml
Adds the page metadata, debugging loop, request-stack explanation, log-reading guidance, symptom-to-layer troubleshooting mappings, completion criteria, and spelling support for AuthRetryableFetchError.
Debugging navigation entry
apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
Adds the Debugging page to the telemetry navigation menu.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: ChrisChinchilla

Poem

I’m a rabbit with logs in my pack,
Finding each layer and tracing it back.
ClickHouse crumbs, anchors in sight,
Debugging paths made clear and bright.
Clean logs hop home—what a delightful track!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is useful, but it does not follow the required template and omits the CONTRIBUTING confirmation and explicit current/new behavior sections. Rewrite the PR description using the repository template, including CONTRIBUTING YES/NO, current behavior, new behavior, and additional context.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: a new Debugging guide plus telemetry log-query best practices.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/logs-explorer-querying-guide

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jul 9, 2026
jordienr added 2 commits July 9, 2026 12:11
The Logs Explorer now runs on ClickHouse (single logs table, source
column, log_attributes map, logs.all.otel endpoint) rather than
per-source BigQuery tables. Rewrite every query and the dialect
section to match, per .claude/skills/clickhouse-logs-queries.
The telemetry/logs guide already documents querying the Logs Explorer
and its best practices, so a separate troubleshooting page duplicated it.
Drop the standalone page and add the three missing, engine-agnostic
practices to the existing Best practices list: query one source at a
time, follow a request across sources with an anchor, and reference only
confirmed field names.
@jordienr jordienr changed the title docs: add guide for querying logs efficiently in the Logs Explorer docs(telemetry): add log-query discipline to the Logs Explorer guide Jul 9, 2026
Add a front-door page for troubleshooting Supabase issues: the
debugging loop, the parallel-services request stack, log-reading
guidance, and a symptom-to-guide routing table that links into the
existing troubleshooting collection. Register it in the Telemetry
nav group right after Logging.
@jordienr jordienr changed the title docs(telemetry): add log-query discipline to the Logs Explorer guide docs(telemetry): add a Debugging guide and log-query best practices Jul 9, 2026
jordienr and others added 2 commits July 10, 2026 10:20
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@jordienr
jordienr marked this pull request as ready for review July 10, 2026 10:20
@jordienr
jordienr requested a review from a team as a code owner July 10, 2026 10:20

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/docs/content/guides/telemetry/debugging.mdx (1)

1-69: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Fix the Prettier check before merge.

The pipeline reports formatting issues in this file. Run the repository-configured Prettier formatter and commit the resulting changes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/docs/content/guides/telemetry/debugging.mdx` around lines 1 - 69, Run
the repository-configured Prettier formatter on the debugging documentation file
and commit the formatting-only changes, preserving the existing content and
links.

Source: Pipeline failures

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/docs/content/guides/telemetry/debugging.mdx`:
- Line 39: In the API-to-database troubleshooting guidance, revise the “almost
always” claim to a qualified statement acknowledging other possible causes such
as filters, authentication, query shape, and schema-cache issues, while
preserving the existing layer-isolation workflow and recommendation to trace
toward the database.

In `@apps/docs/content/guides/telemetry/logs.mdx`:
- Around line 356-367: The logs guide still presents BigQuery-era guidance while
the current Logs Explorer uses ClickHouse. Update the surrounding
troubleshooting sections and all related examples, field references, and query
syntax to valid ClickHouse Logs Explorer conventions, or explicitly label the
material as legacy; ensure anchors and field semantics match the current engine
before publishing.

---

Outside diff comments:
In `@apps/docs/content/guides/telemetry/debugging.mdx`:
- Around line 1-69: Run the repository-configured Prettier formatter on the
debugging documentation file and commit the formatting-only changes, preserving
the existing content and links.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 509d58e0-0073-46bc-808a-a5dd47186b24

📥 Commits

Reviewing files that changed from the base of the PR and between fd8a37b and 767479a.

📒 Files selected for processing (3)
  • apps/docs/components/Navigation/NavigationMenu/NavigationMenu.constants.ts
  • apps/docs/content/guides/telemetry/debugging.mdx
  • apps/docs/content/guides/telemetry/logs.mdx

Comment thread apps/docs/content/guides/telemetry/debugging.mdx Outdated
Comment thread apps/docs/content/guides/telemetry/logs.mdx Outdated

@jeremenichelli jeremenichelli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This content is golden 👌 really really useful. good job!

Left some comments on phrasing and reading cadence.

Comment thread apps/docs/content/guides/telemetry/debugging.mdx Outdated
Comment thread apps/docs/content/guides/telemetry/debugging.mdx Outdated
Comment thread apps/docs/content/guides/telemetry/debugging.mdx Outdated
Comment thread apps/docs/content/guides/telemetry/debugging.mdx Outdated
Comment thread apps/docs/content/guides/telemetry/debugging.mdx
Comment thread apps/docs/content/guides/telemetry/debugging.mdx Outdated
Comment thread apps/docs/content/guides/telemetry/debugging.mdx Outdated
Comment thread apps/docs/content/guides/telemetry/logs.mdx Outdated
Comment thread apps/docs/content/guides/telemetry/logs.mdx Outdated
@jordienr
jordienr merged commit ac7e66f into master Jul 10, 2026
36 checks passed
@jordienr
jordienr deleted the docs/logs-explorer-querying-guide branch July 10, 2026 16:24
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Braintrust eval report

Assistant (master-1783700852)

Score Average Improvements Regressions
Knowledge Usage 94.9% (-3pp) - 1 🔴
SQL Identifier Quoting 100% (+0pp) - -
SQL Validity 100% (+0pp) - -
Tool Usage 73.9% (-1pp) 2 🟢 3 🔴
Time_to_first_token 3.43tok (+0.16tok) 11 🟢 18 🔴
Llm_calls 2.83 (-0.07) 10 🟢 12 🔴
Tool_calls 3.11 (-0.11) 9 🟢 11 🔴
Errors 5.3 (+0.03) 4 🟢 6 🔴
Llm_errors 0 (+0) - -
Tool_errors 0 (+0) - -
Prompt_tokens 26919.56tok (+3047.89tok) 12 🟢 13 🔴
Prompt_cached_tokens 8686.34tok (-859.22tok) 10 🟢 16 🔴
Prompt_cache_creation_tokens 0tok (+0tok) - -
Prompt_cache_creation_5m_tokens 0tok (+0tok) - -
Prompt_cache_creation_1h_tokens 0tok (+0tok) - -
Completion_tokens 621.18tok (-4.97tok) 13 🟢 16 🔴
Completion_reasoning_tokens 101.57tok (-5.44tok) 14 🟢 12 🔴
Total_tokens 27540.75tok (+3042.92tok) 12 🟢 17 🔴
Estimated_cost 0$ (+0$) 9 🟢 17 🔴
Duration 18.19s (+1.11s) 8 🟢 21 🔴
Llm_duration 12.65s (+0.97s) 10 🟢 19 🔴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants