Logfire
Connect
Connect Logfire from the terminal. Pass --help for the flags Logfire accepts.
polylane integration connect --type logfireTwo API keys per project, a project API key and an organization API key, each with Read-only access and Manage project and org.
Connect Pydantic Logfire so agents can query the traces, logs, and metrics your project receives and its alerts reach Polylane the moment they fire.
Setup
Logfire issues query access on a project key and notification channel access on an organization key, so connecting one project takes both. Connect each project separately; the organization key can be reused for every project in the organization.
Project API key (entered first)
- In Logfire, open your project, then Project settings, then Security & access, then New API key
- Check Read-only access and Manage project and org, keep Key type as Project, then Create API key
- Paste the key into Polylane. The region (US or EU) is detected from the key prefix, and Polylane shows the project the key belongs to.
Organization API key (entered second)
- From Project settings, choose Go to org settings, then Security & access, then New API key
- Check Read-only access and Manage project and org, set Key type to Organization, then Create API key
- Paste the key into Polylane. Polylane checks that the key's organization owns the project named by the first key.
Each key shows whether Logfire accepted it as you paste it, and Connect is available once both pass. Both keys are encrypted before they are stored, and the agent never sees them.
What agents can do
- List the services that reported to the project in a time window
- Rank routes by request count, error rate, and p50/p95 latency
- Search spans and logs by service, span name, route, level, exception flag, or HTTP status
- Open one trace as a parent/child span tree with durations and exception messages
- Run a single read-only SQL statement over the records and metrics tables when the curated tools do not cover the question
Alerts
On connect, Polylane adds itself as a notification channel on the Logfire project and attaches that channel to every alert the project has, leaving the channels you already configured untouched. Alerts you add later are picked up within the hour. Each alert Logfire fires arrives as an incident Polylane can investigate. Disconnecting removes the channel and detaches it from every alert.
Every query is scoped to a time window of at most seven days, and the raw SQL path accepts only one SELECT statement.
Why two keys
The project key covers the traces and metrics agents query: Logfire only issues that scope on a key tied to one project. The organization key lets Polylane read the project's alerts and existing notification channels, create its own channel (Logfire keeps channels at the organization level, which is why a project key cannot do this), and attach it to each alert so an alert reaches Polylane the moment it fires and an incident can open early.
Continuous validation
Polylane validates both stored keys every six hours and flags the integration when Logfire rejects either key or the organization key no longer lists the project, so a revoked key surfaces before an investigation needs it.
Disconnecting
Disconnect Logfire in Polylane, then revoke the project API key under Project settings, then Security & access, and the organization API key under Org settings, then Security & access, in Logfire. Keep the organization key if other projects of the organization stay connected.
Disconnect
Disconnecting stops every sync and check and deletes the credentials Polylane held. Everything Polylane set up in Logfire is removed as well; nothing is left behind.
polylane integration disconnect <id>Tools
5Operations agents can perform in threads.