Yes, you can specify a limit when pulling spans into a dataframe using SpanQuery by passing the limit parameter to the query_spans method. For example: px.Client().query_spans(query, limit=100) will return at most 100 spans. This is directly supported and works similarly to the SQL LIMIT clause, restricting the number of rows in the result dataframe. The default limit is often set to 1000 if not specified explicitly[^1^][^2^].Would you like more detail or a code example?Sources:
- docs/tracing/how-to-interact-with-traces/extract-data-from-spans.md
- src/phoenix/session/client.py
💡Hint: Mention RunLLM in the thread for followups.