[Feature]: Support setting span id on langfuse
The Feature
.
Motivation, pitch
allow app owners to set their own custom spans
Twitter / LinkedIn details
No response
@maxdeichmann is there a difference between span id and trace id?
@maxdeichmann is there a difference between span id and trace id?
Hi, yes there is. In the picture, on the right side you see the different elements (Spans + Generations + Events) within a span. A trace is a container of all of these and all these elements have their own ids. What exactly are you looking to support here? I assume that users want to create a LiteLLM generation as a child of a span within Langfuse? In this case, it would maybe make sense to support spans or traces natively in the litellm api:
trace = langfuse.trace()
span = trace.span()
litellm.generate(langfuseSpan= span)
litellm.generate(langfuseTrace= trace)
What do you think about this? Alternatively, we could also use the ids like you did with trace_id already.
Hey guys, I also want to create LiteLLM generations as children of another Langfuse observation, e.g., a span. At least that is how I understand this issue.
I created a separate issue #3558 and PR #3559 to support the parent_observation_id parameter which solves this problem for us.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.