I'm trying to understand how the querying works. I have a trace like this screenshot. With a query like SpanQuery().where("name == 'Suggested - Analyzer'") I get the root span which has input properties and output but I'm not able to retrieve the input prompt or token counts/model/any of that. That's all in the 2nd span. How would you get to that?
馃挕聽Hint: Mention RunLLM in the thread for followups.
Yea I'm looking for a spanquery to get them out programmatically
Just some basic code i've been playing with that isn't getting me there 馃槄
query = SpanQuery().where("name == 'Suggested - Analyzer'")
spans = px.Client().query_spans(query, project_name='prod', timeout=60, limit=5)
for row in spans.iterrows():
print(row)
Hrmm I don't think either of those is ideal. We're doing about 10,000 traces an hour and rapidly growing so loading them all likely won't work for us. That does give me an idea though. I should be able to pull the top level spans as I am now and then query for spans that have that parent id right?
Awesome! That works. This should get me pretty far. I'll be back when I go through our agentic workflows I'm sure 馃槄. Thanks again!
