Related problems
agent-toolchain-coexist— Agent 工具链全家桶能一起装吗?(17 工具 57 对实测兼容清单)logfire-1— FastAPI+SQLModel 测试报 sqlalchemy.exc.NoInspectionAvailablelogfire-2— 升级后刷 Invalid type NoneType for attribute 'http.port' value 警告pip-mirror-source— pip 安装超时/下载慢(ReadTimeoutError / WARNING: Retrying ... Read timed out)
Member of combos (1)
combo-model-access— 多模型接入与成本可观测
No conflict-matrix pairs for this tool yet.
# Logfire — Agent Guide
name: logfire | version_range: 4.41.0~4.41.0 | generated: 2026-08-28
title_en: Logfire - AI/LLM Observability Platform | desc_en: OpenTelemetry-native observability for AI and LLM systems.
Preflight
note: Requires Python >= 3.10.
python3 --version
预期输出: see command output
Install
note: Use the Tsinghua mirror in mainland China (PyPI official times out); pulls opentelemetry family, first install 3-5 min; hosted upload needs logfire auth login, local preview works token-free.
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple logfire==4.41.0
logfire --version
预期输出: Running Logfire 4.41.0 with CPython ...
Operations
View command list
note: Lists CLI and global options.
logfire --help
预期输出: CLI 说明 + 全局选项(--non-interactive/--base-url/--region)
Login to hosted platform (required for uploading telemetry)
note: Interactive browser/device-code flow; token stored in ~/.logfire/.
logfire auth
预期输出: 浏览器/设备码登录流程(交互式;token 存 ~/.logfire/)
In-code instrumentation (library-level integration, Python)
note: Runs in local preview mode without token; real hosted upload not tested.
python3 -c "import logfire; logfire.configure; print('logfire configured: OK')"
预期输出: logfire configured: OK(本地 preview 无 token 可跑)
Local preview service
note: Serves a local preview address; exit with Ctrl+C.
logfire preview
预期输出: 本地预览地址(浏览 trace/span;Ctrl+C 退出)
Uninstall
note: Auto-removes pip package and dedicated config dir; remove in-code instrumentation manually.
pip uninstall -y logfire logfire-api 2>/dev/null || true
rm -rf ~/.logfire
command -v logfire >/dev/null 2>&1 && echo "残留: logfire 仍存在" || echo "logfire removed: OK"
预期输出: logfire removed: OK
Facts
writes: ~/.logfire/ (dedicated) | runtime: Python >= 3.10, pip | notes: hosted upload requires logfire auth (token in ~/.logfire/); local preview token-free; opentelemetry dependency family; first install 3-5 min; all conflicts judged possible-compatible, no shared registration surface
Source: logfire · validated 2026-08-28 · v4.41.0~4.41.0