-
Notifications
You must be signed in to change notification settings - Fork 92
Description
Is your feature request related to a problem? Please describe.
We should be able to automatically track every Burr app using Langfuse automatically.
With hooks (https://burr.dagworks.io/concepts/hooks/) one should be able to do this nicely.
Describe the solution you'd like
A trace-based langfuse integration. The following features at a minimum:
- One trace per application run (this is dependent on this: Pre/Post application interface calls #203)
- One span per step
- One span per tracer span call
- Observations at will (perhaps state elements)
- Perhaps access to the langfuse client.
You'll want to follow the same classes as this does: https://github.com/DAGWorks-Inc/burr/blob/main/burr/tracking/client.py#L60,
except for the BaseStateLoader
, that's not relevant. Then you can store state in it.
See this for an inspiration (this is specific to datadog): https://github.com/DAGWorks-Inc/hamilton/blob/96da3107666dcccdd80da39d7d4d118b4de82571/hamilton/plugins/h_ddog.py#L19.
There are two ways to do this:
- Expose the langfuse client in the functions/classes
- Bury it behind the logger
We should enable both, but strive towards (2).
For (1), we can do it if you pass the langfuse object in for application calls as runtime inputs. This will make it easier: #205.
For (2) we'll need to reconcile our model with theirs. Specifically, this will help: #46.
Let's do (1) then open up another issue for (2)
Describe alternatives you've considered
Additional context