Callback - CozeLoop
CozeLoop Callback
This is a Trace callback implementation for CozeLoop. It implements the Handler interface and integrates seamlessly with Eino applications to provide enhanced observability.
Features
- Implements
github.com/cloudwego/eino/internel/callbacks.Handlerinterface - Easy integration with Eino applications
Installation
go get github.com/cloudwego/eino-ext/callbacks/cozeloop
Quick Start
package main
import (
"context"
"log"
ccb "github.com/cloudwego/eino-ext/callbacks/cozeloop"
"github.com/cloudwego/eino/callbacks"
"github.com/coze-dev/cozeloop-go"
)
func main() {
// Set environment variables
// COZELOOP_WORKSPACE_ID=your workspace id
// COZELOOP_API_TOKEN=your token
client, err := cozeloop.NewClient()
if err != nil {
panic(err)
}
defer client.Close(ctx)
// Call once during service init
handler := ccb.NewLoopHandler(client)
callbacks.AppendGlobalHandlers(handler)
}
More Details
Last modified
December 12, 2025
: chore: update websocket docs (#1479) (967538e)