Skip to content

docs: clarify self-hosted analytics event shape#45256

Open
princepal9120 wants to merge 3 commits intosupabase:masterfrom
princepal9120:docs/self-hosted-analytics-event-shape-40926
Open

docs: clarify self-hosted analytics event shape#45256
princepal9120 wants to merge 3 commits intosupabase:masterfrom
princepal9120:docs/self-hosted-analytics-event-shape-40926

Conversation

@princepal9120
Copy link
Copy Markdown

@princepal9120 princepal9120 commented Apr 26, 2026

Summary

  • clarify the expected event payload shape for self-hosted Analytics Vector ingestion
  • add the key fields Studio Logs expects when querying Analytics sources
  • point custom Vector setups at the existing source names in vector.yml for built-in Studio Logs panels

Tests

  • Not run. Documentation-only change.

Fixes #40926

Summary by CodeRabbit

  • Documentation
    • Improved Vector-based log ingestion docs with corrected wording and clearer guidance.
    • Clarified required payload structure by specifying explicit fields (event_message, timestamp, metadata).
    • Added step-by-step instructions for mapping custom Vector sources to the expected event shape and sending logs to the Analytics /api/logs endpoint with the appropriate source_name.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 26, 2026

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 Apr 27, 2026 2:37pm
7 Skipped Deployments
Project Deployment Actions Updated (UTC)
studio Ignored Ignored Apr 27, 2026 2:37pm
design-system Skipped Skipped Apr 27, 2026 2:37pm
learn Skipped Skipped Apr 27, 2026 2:37pm
studio-self-hosted Skipped Skipped Apr 27, 2026 2:37pm
studio-staging Skipped Skipped Apr 27, 2026 2:37pm
ui-library Skipped Skipped Apr 27, 2026 2:37pm
zone-www-dot-com Skipped Skipped Apr 27, 2026 2:37pm

Request Review

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 26, 2026

@princepal9120 is attempting to deploy a commit to the Supabase Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link
Copy Markdown
Contributor

Thanks for contributing to Supabase! ❤️ Our team will review your PR.

A few tips for a smoother review process:

  • If you have a local version of the repo, run pnpm run format to make sure formatting checks pass.
  • Once we've reviewed your PR, please don't trivially merge master (don't click Update branch if there are no merge conflicts to be fixed). This invalidates any pre-merge checks we've run.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Apr 26, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 26, 2026

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: 2b081578-1c3a-4804-9660-75b693853419

📥 Commits

Reviewing files that changed from the base of the PR and between 801721d and 6d851f5.

📒 Files selected for processing (1)
  • apps/docs/docs/ref/self-hosting-analytics/introduction.mdx

📝 Walkthrough

Walkthrough

Documentation clarifies Vector-based log ingestion for self-hosted analytics: fixes a typo and replaces vague schema guidance with concrete required event fields (event_message, timestamp, metadata) plus step-by-step mapping instructions for custom Vector sources sending to the Analytics /api/logs endpoint.

Changes

Cohort / File(s) Summary
Self-hosted Analytics Documentation
apps/docs/docs/ref/self-hosting-analytics/introduction.mdx
Fixed typo ("pipieline" → "pipeline"); replaced vague schema admonition with explicit event-shape contract and field descriptions (event_message, timestamp, metadata); added guidance for mapping custom Vector sources and using source_name when POSTing to /api/logs.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 I nibbled a typo, then hopped to the logs,
With event_message and timestamp in my paws,
Metadata tucked neat, mapped by Vector's charm,
I sent a curl test and watched Studio glow,
Hooray — the pipeline's right, and all is calm.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers key points but does not follow the provided template structure with the required sections like 'What kind of change' or 'What is the current behavior'. Restructure the PR description to include all template sections: confirmation of reading CONTRIBUTING.md, type of change, current behavior with issue links, new behavior, and additional context.
Linked Issues check ⚠️ Warning The PR addresses core requirements from #40926 by clarifying event schema structure and documenting key fields, but does not include a curl example or complete step-by-step guide as requested in the issue. Add a curl example to test event ingestion and provide more comprehensive step-by-step guidance for custom Vector setup as originally requested in issue #40926.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: clarifying the event shape for self-hosted analytics documentation.
Out of Scope Changes check ✅ Passed The typo fix (pipeline) and documentation clarifications are all directly related to the objectives of clarifying the analytics event shape; no out-of-scope changes detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 and usage tips.

@aantti aantti self-assigned this Apr 27, 2026
@aantti aantti added self-hosted Related to self-hosted Supabase analytics o11y and analytics labels Apr 27, 2026
@aantti aantti requested review from ChrisChinchilla and Ziinc April 27, 2026 08:05
@ChrisChinchilla
Copy link
Copy Markdown
Contributor

@princepal9120 Can you run pnpm format and commit that please I don't have access to your branch to do it myself :)

@princepal9120
Copy link
Copy Markdown
Author

@ChrisChinchilla thanks for the review. I fixed the failing format check by running Prettier on apps/docs/docs/ref/self-hosting-analytics/introduction.mdx. The PR is still approved and checks have restarted.

@ChrisChinchilla ChrisChinchilla enabled auto-merge (squash) April 27, 2026 14:32
@princepal9120
Copy link
Copy Markdown
Author

@ChrisChinchilla @Ziinc the PR is showing GitHub's merge warning: "Head branch was modified. Review and try the merge again."

The approved commit was 801721d7, then I pushed two follow-up commits:

  • 6d851f5 to run/commit the docs formatting requested in review
  • 365d730 to merge the latest master into the branch

Current state from my side:

  • PR is mergeable
  • Checks are passing
  • Latest head is 365d7305bd4982b6bd58393609c512752235cd0d
  • The only thing blocking merge appears to be GitHub requiring the latest head to be reviewed/confirmed after the branch changed

Could you please re-check/re-approve the latest head or try the merge again when you get a chance?

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

Labels

analytics o11y and analytics documentation Improvements or additions to documentation self-hosted Related to self-hosted Supabase

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Clarify event schema in self-hosted analytics docs

3 participants