analytics

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PayloadForAnalyticsEventParam

func PayloadForAnalyticsEventParam(engine workflow.Engine, deviceId string, param EventParam) analytics.InstrumentationCollector

func SendAnalytics

func SendAnalytics(engine workflow.Engine, deviceId string, event EventParam, err error)

func SendAnalyticsToAPI

func SendAnalyticsToAPI(engine workflow.Engine, deviceId string, payload []byte) error

Types

type EventParam

type EventParam struct {
	InteractionType string         `json:"interactionType"`
	Category        []string       `json:"category"`
	Status          string         `json:"status"`
	TargetId        string         `json:"targetId"`
	TimestampMs     int64          `json:"timestampMs"`
	DurationMs      int64          `json:"durationMs"`
	Results         map[string]any `json:"results"`
	Errors          []any          `json:"errors"`
	Extension       map[string]any `json:"extension"`
	InteractionUUID string         `json:"interactionId"`
}

func NewAnalyticsEventParam

func NewAnalyticsEventParam(interactionType string, err error, path types.FilePath, correlationID string) EventParam

NewAnalyticsEventParam builds a new analytics event. correlationID, when non-empty, is stamped on the event as its InteractionUUID so that events sharing a correlationID (e.g. a session-scoped ID minted once per MCP process) can be joined downstream, instead of each call minting its own fresh random ID. Pass an empty string to preserve the previous behavior of letting PayloadForAnalyticsEventParam mint a fresh UUID for this event.

Jump to

Keyboard shortcuts

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