langfuse-trace-list
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseLangfuse Trace List
Langfuse Trace 列表
Display the latest traces with filtering options.
展示带有筛选选项的最新traces。
Setup
配置
Set the following environment variables before use:
| Variable | Required | Description |
|---|---|---|
| Yes | Langfuse public key |
| Yes | Langfuse secret key |
| No | Langfuse host URL (default: |
使用前请设置以下环境变量:
| 变量 | 是否必填 | 说明 |
|---|---|---|
| 是 | Langfuse公钥 |
| 是 | Langfuse密钥 |
| 否 | Langfuse主机URL(默认值: |
When to Use
适用场景
- Checking the trace list
- Debugging LLM calls
- "Show me recent traces"
- "Check traces for a specific user"
- 查看trace列表
- 调试LLM调用
- "展示我近期的traces"
- "查看特定用户的traces"
Commands
命令
1. Get Trace List
1. 获取Trace列表
Get the latest 20 traces:
bash
npx tsx scripts/langfuse-trace-list.tsSpecify the number of traces:
bash
npx tsx scripts/langfuse-trace-list.ts --limit=50获取最新20条traces:
bash
npx tsx scripts/langfuse-trace-list.ts指定traces数量:
bash
npx tsx scripts/langfuse-trace-list.ts --limit=502. Filter Options
2. 筛选选项
bash
undefinedbash
undefinedFilter by trace name
按trace名称筛选
npx tsx scripts/langfuse-trace-list.ts --name=librarian/chat
npx tsx scripts/langfuse-trace-list.ts --name=librarian/chat
Filter by user ID
按用户ID筛选
npx tsx scripts/langfuse-trace-list.ts --user=user-123
npx tsx scripts/langfuse-trace-list.ts --user=user-123
Filter by session ID
按会话ID筛选
npx tsx scripts/langfuse-trace-list.ts --session=session-abc
npx tsx scripts/langfuse-trace-list.ts --session=session-abc
Filter by environment
按环境筛选
npx tsx scripts/langfuse-trace-list.ts --env=production
npx tsx scripts/langfuse-trace-list.ts --env=production
Combine multiple filters
组合多个筛选条件
npx tsx scripts/langfuse-trace-list.ts --name=chat --env=production --limit=100
undefinednpx tsx scripts/langfuse-trace-list.ts --name=chat --env=production --limit=100
undefinedOutput Example
输出示例
Langfuse Traces
===============
Timestamp Name User Session Cost ID
----------------------------------------------------------------------------------------------------------------------------------
2025-01-15 10:30:45 librarian/chat user-123 session-abc $0.0150 abc123...
2025-01-15 10:28:12 knowledge-builder/extract user-456 session-def $0.0080 def456...
2025-01-15 10:25:33 chat/respond user-789 - $0.0045 ghi789...
Showing 3 of 1234 tracesLangfuse Traces
===============
时间戳 名称 用户 会话 成本 ID
----------------------------------------------------------------------------------------------------------------------------------
2025-01-15 10:30:45 librarian/chat user-123 session-abc $0.0150 abc123...
2025-01-15 10:28:12 knowledge-builder/extract user-456 session-def $0.0080 def456...
2025-01-15 10:25:33 chat/respond user-789 - $0.0045 ghi789...
显示1234条中的3条tracesFields
字段说明
| Field | Description |
|---|---|
| Timestamp | Trace creation timestamp |
| Name | Trace name (feature/action format) |
| User | User ID |
| Session | Session ID |
| Cost | Estimated cost |
| ID | Trace ID (for viewing details) |
| 字段 | 说明 |
|---|---|
| 时间戳 | Trace创建时间戳 |
| 名称 | Trace名称(功能/操作格式) |
| 用户 | 用户ID |
| 会话 | 会话ID |
| 成本 | 估算成本 |
| ID | Trace ID(用于查看详情) |