Use Pydantic Logfire to query telemetry collected with OpenTelemetry. Search spans and logs by message, service, span name, severity, environment, or exception status, or run PostgreSQL-compatible read-only SQL over the records and metrics tables.
Trace lookup returns spans ordered by time with parent-child relationships for request investigation. Credential lookup identifies the organization and project targeted by a read token.
Create a project read token under Settings → Read tokens. Sim detects the cloud region from its prefix. For a self-hosted instance, set Host to a publicly resolvable HTTPS base URL that Sim can reach.
Use the block
Run SQL over your observability data, search spans and logs with structured filters, pull an entire trace by ID, and confirm which project a read token targets.
Actions
Logfire Query
Run a read-only SQL query against Logfire traces, logs, and metrics. Reads the records and metrics tables using PostgreSQL-compatible syntax.
Input
Output
Logfire Search Records
Search Logfire spans and logs using structured filters for message text, service, span name, severity, environment, and exceptions. Returns the most recent matches first without writing SQL.
Logfire Get Trace
Fetch every span and log belonging to a Logfire trace, ordered from earliest to latest, so a single request can be reconstructed end to end.
Logfire Get Token Info
Resolve which Logfire organization and project a read token belongs to. Useful for confirming a credential targets the expected project before querying it.