langfuse
できること
Langfuseは、AIアプリの動作を監視し、その仕組みを把握するためのツールです。AIが行う処理の流れを確認したり、AIに与えた指示を管理したり、応答が正しいかをチェックしたりできます。
使う場面
- ✓AIアプリの内部で何が起きているかを確認したいとき。
- ✓AIアプリのエラーを見つけて直したいとき。
- ✓AIの応答を安定させ、品質を保ちたいとき。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/langfuse/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Pythonで作ったアプリを監視するために、Langfuseはどのように設定すればよいですか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
アプリケーションに小さなコードを追加し、重要な情報を記録します。その情報はLangfuseのプラットフォームに送られ、そこで表示や分析ができます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Langfuse
Instrument an existing LLM application with traceable, minimized observations and versioned evaluation inputs. Modified by AAS maintainers on 2026-09-05 to replace mixed legacy SDK examples with a current, bounded setup procedure; existing source attribution is preserved.
When to Use
Use when an application already needs Langfuse tracing, prompt management or evaluation, or when debugging missing/duplicated spans. Do not add an observability service merely because an LLM is present; start from the incident or product decision the data must support.
Inputs and prerequisites
- Installed Python or JS SDK version, framework and runtime lifecycle.
- The explicitly authorized Langfuse project/endpoint, credentials supplied through the project’s secret mechanism, and data retention/access policy.
- An allowlist of observable fields and a synthetic request that contains no private content.
- A defined verifier: expected parent/child spans, status, timing, model/prompt version and flush behavior.
Procedure
- Inspect the dependency lock and existing instrumentation. Do not mix old
langfuse.trace(),langfuse.decoratorsorlangfuse.callbackexamples with the current SDK without checking its migration guide. - Choose one integration layer: direct SDK spans, a framework callback or OpenTelemetry instrumentation. Avoid tracing the same call twice through overlapping wrappers.
- Configure the approved endpoint and credentials outside source. Verify export permission before running an example: instrumentation can send inputs, outputs, metadata and exceptions externally.
- Start with explicit observations containing only synthetic or allowlisted values. Add correlation IDs only when their scope and privacy treatment are defined.
- Execute one success and one failure request; inspect the actual exported span tree and verify no sensitive fields escaped through nested metadata or third-party instrumentation.
- Flush in short-lived processes and test shutdown/timeouts. A returned SDK call does not by itself prove ingestion.
- Add prompt/evaluation metadata only after the trace boundary works. Pin the prompt version or record the exact resolved version; a mutable production label is not an immutable experiment input.
Minimal Python observation
The current Python SDK overview documents get_client() and context-managed observations. Use the API matching the installed SDK. After configuration and export authorization, this synthetic example creates one span and no LLM call:
from langfuse import get_client
client = get_client()
with client.start_as_current_observation(as_type="span", name="synthetic-health-check") as span:
span.update(output={"status": "ok"})
client.flush()
Expected observation: one completed synthetic-health-check span in the intended project with the fixed status value. This skill does not claim that a live ingestion check has run. A wrong endpoint, missing credentials or exporter failure must be reported as a failed/unverified check.
Privacy and masking
Do not treat truncation as redaction. Prefer omitting raw prompts, user messages and tool payloads; inspect all configured exporters. Current Python SDKs provide mask_otel_spans for export-time transformation; the legacy mask hook covers a narrower set of SDK-created attributes. Choose the installed-version mechanism using the masking documentation, and test a synthetic secret in nested metadata and an exception. Collector-side filtering occurs after data leaves the application, so place it within the approved trust boundary.
Prompt management and evaluation
Record dataset revision, prompt version, model identifier, tool configuration and evaluator definition. Keep evaluator errors distinct from low scores. A judge response must pass a bounded schema and finite-range validation; never convert arbitrary model text directly with float() and call it measured quality. Calibrate judgments against reviewed examples and report disagreement. Separate user feedback from an automatic judge score.
…
よくある質問
「スパン」とは何ですか?
AIアプリの中で起きた個々の出来事の記録のことです。何が、いつ、どれくらいの時間をかけて起きたかが分かります。
Langfuseは機密データを守ってくれますか?
はい。監視データを送信する前に、機密情報をマスキングしたり省略したりする機能があり、プライバシーを守れます。
Langfuseは複数のプログラミング言語で使えますか?
はい。PythonとJavaScriptに対応しており、LangChainやLlamaIndexといった人気のフレームワークとも連携できます。
詳細
作者による元の説明
Expert in Langfuse - the open-source LLM observability platform. Covers tracing, prompt management, evaluation, datasets, and integration with LangChain, LlamaIndex, and OpenAI. Essential for debugging, monitoring, and improving LLM applications in production.
人気
- GitHubのスター
- 48k
- ランキング
- #5025
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
add-model-provider
394k安全なセットアップコマンドで新しいAIモデルプロバイダーをOpenClawに接続し、APIキーを平文で残さず、ライブテストを行うようエージェントを支援します。
acp-router
394kClaude CodeやCursorなどのコーディングアシスタントに、OpenClaw経由でタスクを渡し、その作業がそのツール内で行われるようエージェントを支援します。
browser-automation
394kログイン、タブ、応答しなくなったページからの復旧を含め、Webページを段階的に操作するようエージェントに教えます。