Hello! I just switched to Phoenix 9.3.0 馃殌 (from 8.31.0) and I am noticing a change in the query_spans behavior, particularly the limit does not seem to be respected in my case anymore, ex:
import phoenix as px
traces_df = px.Client().query_spans(project_name='my-project', root_spans_only=True, start_time=start_time, limit=100)
len(traces_df)
> 13 # It should have definitely retrieved 100 root spans in this caseThis was not the case with 8.31.0 . Is this related to root_spans_only? with limit being applied before filtering on root_spans? Thanks for your help!
Yes, in Phoenix 9.3.0, the limit parameter in query_spans is applied after filtering for root_spans_only, not before. This means if you set root_spans_only=True, the query first filters for root spans and then applies the limit, so you may get fewer results than expected if there are not enough root spans in the specified time range. This behavior is confirmed in the source code and documentation and is consistent with recent changes to span querying logic.Would you like more detail on how to work around this or how the filtering and limiting are implemented internally?Sources:
- https://github.com/Arize-ai/phoenix/blob/main/src/phoenix/trace/dsl/query.py
- https://github.com/Arize-ai/phoenix/pull/3053
馃挕聽Hint: Mention RunLLM in the thread for followups.
Hi 馃敀[private user], this does return len(traces_df) -> 100 馃憤
