mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 01:15:03 +03:00
## What Adds an agent skill, `clickhouse-logs-queries`, to help teammates write and migrate logs queries against the ClickHouse-backed `logs` table. It covers: - The `logs` table schema, sources, and the `log_attributes` map - ClickHouse vs BigQuery functions (`count()`, `match`/`ilike`, `toInt32OrZero`, `mapKeys`) - Best practices (filter by source, always LIMIT, tight time range) - A BigQuery-to-ClickHouse migration guide with a full before/after - How to wire branded analytics SQL in the Studio codebase (`safeSql`/`analyticsLiteral`, the endpoint/builder pickers, the OTEL generators) ## Why The logs backend is moving to a single ClickHouse table behind the `otelLegacyLogs` flag. This skill gives a single, accurate reference so query authoring and code migration stay consistent. ## Files - `.claude/skills/clickhouse-logs-queries/SKILL.md` - `.claude/skills/clickhouse-logs-queries/references/bigquery-migration.md` - `.claude/skills/clickhouse-logs-queries/references/codebase-integration.md` Docs only, no runtime code. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added guidance for working with ClickHouse-backed logs queries, including source filtering, structured field access, function equivalents, and example queries. * Added a step-by-step reference for converting existing logs SQL to the new query format. * **Documentation** * Added implementation notes for wiring logs queries correctly in the app, including safe SQL construction, query routing, and feature-flag-aware behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>