Callback - Langfuse
Eino provides Langfuse tracing wrappers based on graph callbacks (see https://langfuse.com/docs/get-started). Example:
package main
import (
"github.com/cloudwego/eino-ext/callbacks/langfuse"
"github.com/cloudwego/eino/callbacks"
)
func main() {
cbh, flusher := NewLangfuseHandler(&Config{
Host: "https://cloud.langfuse.com",
PublicKey: "pk-xxx",
SecretKey: "sk-xxx",
})
callbacks.AppendGlobalHandlers(cbh) // set langfuse as global callback
g := NewGraph[string,string]()
/*
* compose and run graph
*/
flusher() // wait until all traces are flushed before exit
}
You can view traces in the Langfuse project:
Last modified
December 12, 2025
: chore: update websocket docs (#1479) (967538e)
