Esta página se muestra en inglés. Una traducción al español está en curso.
SkillsMay 12, 2026·2 min de lectura

Logfire — Python Observability on OpenTelemetry

Logfire is Pydantic’s Python SDK for traces/metrics/logs on OpenTelemetry, helping teams add observability with minimal code and query data with SQL.

Listo para agents

Instalación lista para agent

Este activo puede instalarse después de elegir el runtime, revisar el plan y ejecutar el comando correspondiente.

Native · 98/100Política: permitir
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Single
Confianza
Confianza: Established
Entrada
Asset
Comando de instalación directa
npx -y tokrepo@latest install 67236d34-9663-4f58-a975-0a218f099c6d --target codex

Ejecutar después de confirmar el plan con dry-run.

Introducción

Logfire is Pydantic’s Python SDK for traces/metrics/logs on OpenTelemetry, helping teams add observability with minimal code and query data with SQL.

  • Best for: Python teams who want quick, consistent observability for apps and agent backends
  • Works with: Python apps (e.g., FastAPI) and OpenTelemetry-compatible backends
  • Setup time: 10–30 minutes

Practical Notes

  • Quant: aim for 1 end-to-end request trace with spans for DB + HTTP within the first hour.
  • Quant: track p95 latency and error rate before vs after adding instrumentation.

Agent backend tip: make tool calls observable

If you run an agent service, the fastest win is instrumenting tool calls:

  • external HTTP requests,
  • database queries,
  • vector search,
  • and model API calls.

Name spans consistently (e.g., tool.http, tool.sql, tool.vector) so you can answer: where did time and failures go?

Data hygiene

Avoid logging secrets. Configure scrubbing/redaction early and review what ends up in traces before enabling in production.

FAQ

Q: Is the whole platform open-source? A: No. This repo is the open-source SDK and docs; the hosted platform is separate.

Q: Can I export to another backend? A: Yes—OpenTelemetry compatibility means you can target other OTel backends if needed.

Q: What should I instrument first? A: Start with request traces + tool calls, then add DB/HTTP client instrumentation.

🙏

Fuente y agradecimientos

Source: https://github.com/pydantic/logfire > License: MIT > GitHub stars: 4,236 · forks: 234

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados