Live View¶
The live view is the focal point ofLogfire, where you can see traces arrive in real-time.
The live view is useful for watching what's going on within your application in real-time (as the name suggests). You can also explore historical data in thesearch pane.
SQL search pane¶
To search the live view, clickSearch your spans
(keyboard shortcut/
), this opens the search pane:
SQL Search¶
For confident SQL users, write your queries directly here. For devs who want a bit of help,try the newPydantic AI feature which generates a SQL query based on your prompt.You can also review the fields available and populate your SQL automatically using theReference
list, see more on this below.
WHERE clauseAs the greyed outSELECT * FROM RECORDS WHERE
implies, you're searching inside theWHERE
clause of a SQL query.It has auto-complete & schema hints, so try typing something to get a reminder. To run your query clickRun
orkeyboard shortcutcmd+enter
(orctrl+enter
on Windows/Linux).
Note: you can run more complex queries on theexplore screen
The schema for the records table is:
CREATETABLErecordsAS(start_timestamptimestampwithtimezone,created_attimestampwithtimezone,trace_idtext,span_idtext,parent_span_idtext,kindspan_kind,end_timestamptimestampwithtimezone,levelsmallint,span_nametext,messagetext,attributes_json_schematext,attributesjsonb,tagstext[],otel_linksjsonb,otel_eventsjsonb,is_exceptionboolean,otel_status_codestatus_code,otel_status_messagetext,otel_scope_nametext,otel_scope_versiontext,otel_scope_attributesjsonb,service_namespacetext,service_nametext,service_versiontext,service_instance_idtext,process_pidinteger)
You can search for any of these in theReference
list:
If you're not sure where to start, scroll down to theStart here
for beginner-friendly suggestions.
Ask in Language -> Get SQL¶
Write your question in your native language, and the model will convert that question to a SQL query.
This is useful if you're not confident with SQL and/or can't quite remember how to format more complicated clauses. You have the option to create a completely new query withGet new SQL
, or (if you have some SQL already) modify the existing query withModify existing SQL
.
Under the hood this feature uses an LLM running withPydantic AI.
Reference¶
Reference: A list of pre-populated query clauses. Clicking any of the clauses will populate the SQL editor, and (where applicable) you can choose a value from the autopopulated dropdown.
This list gives you a powerful way to rapidly generate the query you need, while simultaneouslylearning more about all the ways you can search your data. Clicking multiple clauses will add themto your query with a SQLAND
statement. If you'd like something other than anAND
statement, youcan replace this with alternative SQL operators likeOR
, orNOT
.
Details panel closed¶
This is what you'll see when you come to the live view of a project with some data.
Organization and project labels: In this example, the organization is
christophergs
, and the project isdocs-app
. You can click the organization name to go to the organization overview page; the project name is a link to this page.Environment: In the above screenshot, this is set to
all envs
. See theenvironments docs for details.Timeline: This shows a histogram of the counts of spans matching your query over time. The blue-highlighted section corresponds to the time range currently visible in the scrollable list of traces below. You can click at points on this line to move to viewing logs from that point in time.
Status label: This should show "Connected" if your query is successful and you are receiving live data. If you have a syntax error in your query or run into other issues, you should see details about the problem here.
Level, Service, scope, and tags visibility filters: Here you can control whether certain spans are displayed based on their level, service, scope, or tags. Important note: this only filters datacurrently on the screen.
A collapsed trace: The
+
symbol to the left of the span message indicates that this span has child spans, and can be expanded to view them by clicking on the+
button.Scope label: This pill contains the
otel_scope_name
of the span. This is the name of the OpenTelemetry scope that produced the span. Generally, OpenTelemetry scopes correspond to instrumentations, so this generally gives you a sense of what library's instrumentation produced the span. This will be logfire when producing spans using the logfire APIs, but will be the name of the OpenTelemetry instrumentation package if the span was produced by another instrumentation. You can hover to see version info.
Details panel open¶
When you click on a span in the Traces Scroll, it will open the details panel, which you can see here.
Level icon: This icon represents the highest level of this span and any of its descendants.
Details panel orientation toggle, and other buttons: The second button copies a link to view this specific span. The X closes the details panel for this span.
Exception warning: This exception indicator is present because an exception bubbled through this span. You can see more details in the Exception Traceback details tab.
Pinned span attributes: This section contains some details about the span. The link icons on the "Trace ID" and "Span ID" pills can be clicked to take you to a view of the trace or span, respectively.
Details tabs: These tabs include more detailed information about the span. Some tabs, such as the Exception Details tab, will only be present for spans with data relevant to that tab.
Arguments panel: If a span was created with one of the logfire span/logging APIs, and some arguments were present, those arguments will be shown here, displayed as a Python dictionary.
Attributes: Full span attributes panel - when any attributes are present, this panel will show the full list of OpenTelemetry attributes on the span.