Skip to content

docs: add Pydantic Logfire guide for Hindsight tracing#1339

Merged
nicoloboschi merged 2 commits intomainfrom
feat/logfire-tracing-guide
Apr 30, 2026
Merged

docs: add Pydantic Logfire guide for Hindsight tracing#1339
nicoloboschi merged 2 commits intomainfrom
feat/logfire-tracing-guide

Conversation

@benfrank241
Copy link
Copy Markdown
Contributor

@benfrank241 benfrank241 commented Apr 29, 2026

Summary

Logfire "integration" is a configuration guide pointing the existing OpenTelemetry exporter at Logfire's OTLP endpoint — no Logfire-specific code, no new dependencies, no integration package changes.

Hindsight already emits the right spans server-side (hindsight.retain, hindsight.recall, hindsight.reflect, plus their LLM sub-spans following GenAI semantic conventions). Logfire is just another OTLP receiver alongside Langfuse / DataDog / Honeycomb.

Changes

  • New page hindsight-docs/docs/developer/logfire.md:
    • Three env-var setup
    • Trace-tree screenshots (text-rendered) showing what users see
    • Pairing with logfire.instrument_pydantic_ai() so agent.run nests Hindsight spans
    • Useful Logfire queries (retain failures, p95 recall latency, empty-recall hit rate, reflect tool depth)
    • Troubleshooting
  • One-line addition in hindsight-docs/docs/developer/monitoring.md so Logfire appears in the supported-backends list with a link to the new page

Companion content

A blog post version of this lands separately in hindsight-marketing-content for cross-publication on Pydantic's blog (per the collaboration with Laís Carvalho).

Hindsight already emits OpenTelemetry spans for retain / recall / reflect
(plus their LLM sub-spans) via the existing OTLP HTTP exporter. Logfire
is an OTel-native receiver, so wiring it up is three env vars — no code
changes, no new dependency.

- New /developer/logfire guide page: env-var config, what the trace tree
  looks like, pairing with logfire.instrument_pydantic_ai(), useful
  Logfire queries, and troubleshooting
- Cross-link from the existing Distributed Tracing section in monitoring.md
  so Logfire sits next to Langfuse / DataDog / Honeycomb in the supported
  backends list
@benfrank241 benfrank241 marked this pull request as ready for review April 29, 2026 18:20
Copy link
Copy Markdown
Collaborator

@nicoloboschi nicoloboschi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have a blog post instead of a fixed page for the logfire setup? it's just about setting up logfire, not really hindsight

let's keep only the monitoring change + a new blog post when you have time

Per Nicolò's review on this PR — the dedicated /developer/logfire page
was mostly Logfire setup, not Hindsight. Keeping only the one-line
mention in the existing OTLP-backends list in monitoring.md, with the
link pointing to logfire.pydantic.dev directly.

The setup walkthrough, query examples, and troubleshooting moved into
the companion blog post (hindsight-marketing-content#113).
@benfrank241
Copy link
Copy Markdown
Contributor Author

Done — pushed 3d97ccb:

  • Deleted hindsight-docs/docs/developer/logfire.md (the dedicated guide page)
  • Kept the one-line mention in monitoring.md listing Logfire alongside the other OTLP backends; updated the link to point to logfire.pydantic.dev directly instead of the now-deleted page

The Logfire-specific setup walkthrough (3 env vars), query examples, and troubleshooting all moved into the companion blog post: vectorize-io/hindsight-marketing-content#113. PR #1339 is now genuinely a Hindsight-side change only.

@nicoloboschi nicoloboschi merged commit a908ade into main Apr 30, 2026
55 of 58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants