Cette page est affichée en anglais. Une traduction française est en cours.
SkillsMay 12, 2026·2 min de lecture

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.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Asset
Commande d'installation directe
npx -y tokrepo@latest install 67236d34-9663-4f58-a975-0a218f099c6d --target codex

À exécuter après confirmation du plan en dry-run.

Introduction

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.

🙏

Source et remerciements

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

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires