Esta página se muestra en inglés. Una traducción al español está en curso.
ScriptsMay 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

Este activo puede ser leído e instalado directamente por agents

TokRepo expone un comando CLI universal, contrato de instalación, metadata JSON, plan según adaptador y contenido raw para que los agents evalúen compatibilidad, riesgo y próximos pasos.

Stage only · 29/100Stage only
Superficie agent
Cualquier agent MCP/CLI
Tipo
Script
Instalación
Single
Confianza
Confianza: Established
Entrada
logfire
Comando CLI universal
npx tokrepo install 67236d34-9663-4f58-a975-0a218f099c6d
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