langfuse-deploy-integration

Featured

Deploy Langfuse with your application across different platforms. Use when deploying Langfuse to Vercel, AWS, GCP, or Docker, or integrating Langfuse into your deployment pipeline. Trigger with phrases like "deploy langfuse", "langfuse Vercel", "langfuse AWS", "langfuse Docker", "langfuse production deploy".

DevOps & Infrastructure 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Langfuse Deploy Integration ## Overview Deploy Langfuse LLM observability alongside your application. Covers integrating the SDK for serverless (Vercel/Lambda), Docker, Cloud Run, and self-hosting the Langfuse server itself. ## Prerequisites - Langfuse API keys (cloud or self-hosted) - Application using Langfuse SDK - Target platform CLI installed ## Instructions ### Step 1: Vercel / Next.js Deployment ```bash set -euo pipefail # Add secrets to Vercel vercel env add LANGFUSE_PUBLIC_KEY production vercel env add LANGFUSE_SECRET_KEY production vercel env add LANGFUSE_BASE_URL production ``` ```typescript // app/api/chat/route.ts (Next.js App Router) import { NextRequest, NextResponse } from "next/server"; import { LangfuseClient } from "@langfuse/client"; import { startActiveObservation, updateActiveObservation } from "@langfuse/tracing"; import OpenAI from "openai"; const langfuse = new LangfuseClient(); const openai = new OpenAI(); export async function POST(req: NextRequest) { const { messages } = await req.json(); const response = await startActiveObservation( { name: "chat-api", asType: "generation" }, async () => { updateActiveObservation({ model: "gpt-4o", input: messages, metadata: { endpoint: "/api/chat" }, }); const result = await openai.chat.completions.create({ model: "gpt-4o", messages, }); updateActiveObservation({ output: result.choices[0].message, usage...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category