Hi everyone, is there a way to track non llm costs and add them to the cumulative cost of the span ? If so, what is the attribute I need to set with the cost ?
馃挕聽Hint: Mention RunLLM in the thread for followups.
馃敀[private user] yes, I've looked at the issue and it is exactly what I want, I'll follow it. Thank you for the answer !
Mikyo I don't think I'll open a new issue since there is already a similar one. I want to track the costs of my agentic application (with adk), most of the costs are LLM costs which are already handled, but sometimes, the tools do stuff that incurs additional costs (image generation for example), and I want to track them in the cumulative cost of the trace. Currently I just add a new attribute cost in the span of the tool, but it isn't taken into account in the total sum.
Mikyo yeah, keeping them clearly separated (tool costs and llm costs for example as you said) is what I want, as well as having them aggregated in the cumulative cost. Is it possible to use the span cost table currently ? Here's an example of how I do it for now :
span = tracer.start_span("image_generation")
span.set_attribute("cost", 0.245)
span.end()Gotcha, no it鈥檚 not currently supported so would definitely need to make adjustments. I鈥檒l update the ticket as I go. Appreciate the enhancement idea!
