For the last two weeks I've been putting Pydantic Logfire into an agent stack, and there's one architectural choice that keeps making my job easier:
Every span you send to Logfire becomes a row in a Postgres table.
Not a document in a proprietary column store. Not a segment in a custom time-series engine. A row. In a table called records. With JSONB attributes.
Which means: you can point psql at it. Or DBeaver. Or Metabase. Or a Jupyter notebook via SQLAlchemy. Or dbt. Or your CI pipeline.
For classic web apps, that's a nice-to-have. For LLM and agent workloads, it collapses the observability→BI pipeline from six hops (SDK → collector → vendor backend → nightly export → warehouse → BI) down to two (SDK → Postgres → BI).
The question every ops team eventually asks — "which model is costing me the most and failing most often?" — becomes a single GROUP BY attributes->>'gen_ai.request.model' instead of a multi-widget dashboard.
Full write-up (real query, honest trade-offs, when NOT to use it):
Repo: