Versions in this module Expand all Collapse all v1 v1.1.0 Jun 15, 2026 Changes in this version + type AgentLogger struct + Logger *slog.Logger + func NewAgentLogger(logger *slog.Logger) *AgentLogger + func (l *AgentLogger) LogAgentRound(round int, toolCalls int, hasResponse bool) + func (l *AgentLogger) LogModelCall(model string, tokens int, duration time.Duration, err error) + func (l *AgentLogger) LogToolCall(toolName string, args map[string]any, duration time.Duration, err error) + type NoOpTracer struct + func (NoOpTracer) Start(ctx context.Context, name string) (context.Context, Span) + type OTelAgentLogger struct + func NewOTelAgentLogger(tracer *OTelTracer, metrics *OTelMetrics) *OTelAgentLogger + func (l *OTelAgentLogger) LogAgentRound(ctx context.Context, round int, toolCalls int, hasResponse bool) + func (l *OTelAgentLogger) LogModelCall(ctx context.Context, model string, tokens int, duration time.Duration, ...) + func (l *OTelAgentLogger) LogToolCall(ctx context.Context, toolName string, args map[string]any, ...) + type OTelMetrics struct + func NewOTelMetrics(name string) (*OTelMetrics, error) + func (m *OTelMetrics) RecordAgentRound(ctx context.Context) + func (m *OTelMetrics) RecordModelCall(ctx context.Context, model string, tokens int, err error) + func (m *OTelMetrics) RecordToolCall(ctx context.Context, toolName string, duration time.Duration, err error) + type OTelSpan struct + func (s *OTelSpan) End() + func (s *OTelSpan) RecordError(err error) + func (s *OTelSpan) SetAttribute(key string, value any) + func (s *OTelSpan) SetStatus(code SpanCode, description string) + type OTelTracer struct + func NewOTelTracer(name string) *OTelTracer + func NewOTelTracerWithProvider(name string, provider trace.TracerProvider) *OTelTracer + func (t *OTelTracer) Start(ctx context.Context, name string) (context.Context, Span) + type SlogTracer struct + Logger *slog.Logger + func NewSlogTracer(logger *slog.Logger) *SlogTracer + func (t *SlogTracer) Start(ctx context.Context, name string) (context.Context, Span) + type Span interface + End func() + RecordError func(err error) + SetAttribute func(key string, value any) + SetStatus func(code SpanCode, description string) + type SpanCode int + const SpanError + const SpanOK + type Tracer interface + Start func(ctx context.Context, name string) (context.Context, Span) + type WorkflowAspect struct + func NewWorkflowAspect(tracer Tracer) *WorkflowAspect + func (a *WorkflowAspect) Around(ctx *node.AspectContext, n node.Node, next func() (map[string]any, error)) (map[string]any, error)