langfuse-previews

Manages disposable per-PR Langfuse preview environments including access, seeding, and kubectl debugging.

34.0k|3.7k|Updated May 18, 2023
One-click install
npx skills add https://github.com/langfuse/langfuse --skill langfuse-previews
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langfuse-previews
Source: https://github.com/langfuse/langfuse/tree/main/.agents/skills/langfuse-previews
Command: npx skills add https://github.com/langfuse/langfuse --skill langfuse-previews

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Engineers working on Langfuse pull requests need a live, full-stack environment to test changes, but spinning up, accessing, seeding, and debugging these disposable PR previews involves non-obvious gates, credentials, and kubectl workflows.

Core Features & Use Cases

  • Preview lifecycle management: Explains how same-repo PRs auto-build and deploy to pr-N.preview.langfuse.com, how the build and deploy allowlist gates work, and how updates and teardown behave.
  • Test data seeding: Guides running the deterministic seed CLI from a local checkout against a preview's Postgres and ClickHouse over kubectl port-forwards.
  • Debugging and recovery: Provides kubectl commands for logs, pod diagnosis, waking sleeping off-hours previews, and a symptom-to-fix table for common failures like 404s, Pending pods, and ClickHouse OOMs.
  • Use Case: You opened a PR, the build comment posted, but the preview URL 404s — the Skill tells you the deploy allowlist is the cause and how to add yourself in the infrastructure repo.

Quick Start

Ask the assistant to help you access, seed test data into, or debug the Langfuse preview environment for your pull request number.

Frequently Asked Questions about langfuse-previews

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I get a preview environment for my Langfuse pull request?

Open a same-repo PR on langfuse/langfuse and it is auto-labeled preview, triggering a web and worker image build in about five minutes. A bot comment posts the URL and login, and the preview deploys if your GitHub author login is on the deploy allowlist.

Why does my Langfuse preview URL return 404 after the build succeeded?

A 404 after a successful build means the PR author is not on the deploy allowlist in the Argo CD ApplicationSet. Add your GitHub login to the author selector in k8s/preview/bootstrap/applicationset.yaml in langfuse/infrastructure and merge to main.

How do I seed test data into a Langfuse PR preview?

Port-forward the preview's Postgres and ClickHouse services with kubectl, read the generated passwords from the langfuse-secrets secret, then run pnpm run seed:scenario from packages/shared with DATABASE_URL and CLICKHOUSE_URL overrides. Run from a checkout whose migrations match the PR branch.

Can fork pull requests get a Langfuse preview deployment?

No, fork PRs never build or deploy previews because a public-repo PR cannot mint the required cloud credential. Only same-repo PRs from authors with write access trigger the preview build.

Why is my Langfuse preview unresponsive at night or on weekends?

Previews run only Monday to Friday 08:00-24:00 Europe/Berlin and scale to zero off-hours, and requests do not wake them. Wake one with kubectl annotate ns langfuse-pr-N downscaler/force-uptime=true --overwrite, which restores replicas in about 60 seconds.

What happens to preview data when a pull request is closed or merged?

Closing or merging a PR tears down the entire preview: namespace, database, and DNS record are deleted. Reopening the PR creates a fresh environment rather than restoring the old data.