Logfire
Connect
Connect Logfire from the terminal. Pass --help for the flags Logfire accepts.
polylane integration connect --type logfireTwo API keys for each project: a project API key and an organization API key, each with Read-only access and Manage project and org.
Connect one Pydantic Logfire project with a project API key and an organization API key.
Connect each project separately. You can use the same organization key for every project in the organization.
Project API key (enter it first)
- In Logfire, open your project, then Project settings, then Security & access, then New API key.
- Select Read-only access and Manage project and org. Keep Key type as Project, then select Create API key.
- Paste the key into Polylane. Polylane finds the region (US or EU) from the key prefix and shows the project of the key.
Organization API key (enter it second)
- From Project settings, choose Go to org settings, then Security & access, then New API key.
- Select Read-only access and Manage project and org. Set Key type to Organization, then select Create API key.
- Paste the key into Polylane. Polylane checks that the organization of the key owns the project of the first key.
Each key shows whether Logfire accepted it. Connect becomes available when both keys pass. Polylane encrypts both keys before it stores them, and the agent never sees them.
On connect, Polylane creates a webhook notification channel named polylane · <project name> in your Logfire organization and attaches it to every alert of the project.
How it works
Alerts start investigations
Each alert keeps the channels that you assigned to it. Polylane adds its channel with no schedule, so it gets notices at all hours. Every hour, Polylane creates the channel again if someone deleted it, and attaches it to each alert that does not have it. An alert that you create reaches Polylane within one hour.
When an alert has results, Polylane opens an issue and triages it. More notices of the same alert go to the same issue. When the alert has no more results, that notice goes on the issue timeline, and the agent uses it as evidence.
On the Alerts tab of the integration page, turn automatic triage on or off for the connection or for each alert.
Checks
Polylane runs checks on the project every 30 minutes. They watch the request error rate, the request volume, and the approximate p95 request latency of the project. A fourth check reads the error rate of each of your busiest services, so the check names a service that fails. Polylane also reads error records to find errors that it did not see before, and finds signals: queries that watch one business operation, such as a checkout.
Under Anomaly detection on the integration page, change how often the checks run, or turn them off. Polylane also explores the connection when you connect it and every 12 hours, and opens an issue for each problem that it finds.
During an investigation
Agents can:
- List the services that sent spans or logs to the project in a time window.
- Rank routes by request count, error rate, and p50 and p95 latency.
- Search spans and logs by service, span name, route, level, exception flag, or HTTP status.
- Open one trace as a parent and child span tree, with durations and exception messages.
- Run one read-only SQL
SELECTstatement over the records and metrics tables, when the other tools do not answer the question.
Each query reads a time window of at most seven days.
Key checks
Polylane checks both stored keys every six hours. It marks the integration when Logfire rejects a key, or when the organization key no longer lists the project. Under Credentials on the integration page, verify the saved keys or replace them.
Keys
Logfire gives query access only to a key for one project, and keeps notification channels at the organization level. So each connection needs two keys:
- The project key lets agents query the traces, logs, and metrics of the project.
- The organization key lets Polylane read the alerts of the project and your notification channels, create its own channel, and attach that channel to each alert.
Disconnecting
Disconnecting removes the Polylane channel from every alert and deletes the channel. Then revoke the project API key in Logfire, under Project settings, then Security & access. Revoke the organization API key under Org settings, then Security & access. 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.