analytics

package
v0.0.0-...-4b2b8ef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// PostHogAPIKey is the PostHog project API key
	PostHogAPIKey = ""
)

Functions

func EmitAgentCreated

func EmitAgentCreated(client Client, agentID string, agentName string, modelName string)

func EmitAgentDeleted

func EmitAgentDeleted(client Client, agentID string, agentName string)

func EmitAgentHandoff

func EmitAgentHandoff(client Client, fromAgentID string, toAgentID string, taskID string, reason string, turnNumber int)

func EmitAgentUpdated

func EmitAgentUpdated(client Client, agentID string, agentName string, updatedFields []string)

func EmitCodeInterpreterSession

func EmitCodeInterpreterSession(client Client, taskID string, scriptsExecuted int, errorsEncountered int, linesOfCode int)

func EmitConversationResumed

func EmitConversationResumed(client Client, taskID string, daysSinceLastActivity int, messageCount int)

func EmitMessageCreated

func EmitMessageCreated(client Client, messageID string, taskID string, role string)

func EmitMessageDeleted

func EmitMessageDeleted(client Client, messageID string, taskID string, role string)

func EmitModelCreated

func EmitModelCreated(client Client, modelID string, modelName string, modelProviderID string, contextWindow int32)

func EmitModelDeleted

func EmitModelDeleted(client Client, modelID string, modelName string, modelProviderID string)

func EmitModelProviderCreated

func EmitModelProviderCreated(client Client, modelProviderID string, modelProviderName string, providerType string)

func EmitModelProviderDeleted

func EmitModelProviderDeleted(client Client, modelProviderID string, modelProviderName string, providerType string)

func EmitQuickAsk

func EmitQuickAsk(client Client, agentName string, maxTurns int, filesIncluded int, hasStdinInput bool, questionLength int)

func EmitSessionStarted

func EmitSessionStarted(client Client, sessionType string, agentName string, workspace string, hasExistingFiles bool)

func EmitTaskCreated

func EmitTaskCreated(client Client, taskID string, agentID string)

func EmitTaskDeleted

func EmitTaskDeleted(client Client, taskID string, agentID string)

func EmitTaskUpdated

func EmitTaskUpdated(client Client, taskID string, updatedFields []string)

func EmitToolExecuted

func EmitToolExecuted(client Client, taskID string, toolName string, executionTimeMs int64, success bool, errorType string)

Types

type Client

type Client interface {
	Enqueue(event Event)
	Close()
}

type Event

type Event struct {
	DistinctId string
	Event      string
	Properties map[string]interface{}
}

type InMemoryClient

type InMemoryClient struct {
	Events []Event
}

func NewInMemoryClient

func NewInMemoryClient() *InMemoryClient

func (*InMemoryClient) Close

func (c *InMemoryClient) Close()

func (*InMemoryClient) Enqueue

func (c *InMemoryClient) Enqueue(event Event)

type NoopClient

type NoopClient struct {
}

func NewNoopClient

func NewNoopClient() *NoopClient

func (*NoopClient) Close

func (c *NoopClient) Close()

func (*NoopClient) Enqueue

func (c *NoopClient) Enqueue(event Event)

type PostHogClient

type PostHogClient struct {
	// contains filtered or unexported fields
}

func NewPostHogClient

func NewPostHogClient() (*PostHogClient, error)

func (*PostHogClient) Close

func (c *PostHogClient) Close()

func (*PostHogClient) Enqueue

func (c *PostHogClient) Enqueue(event Event)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL