{"modulePath":"github.com/wavetermdev/waveterm","version":"v0.14.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package telemetry\n\n## Constants\n\n```go\nconst ActivityEventName = \"app:activity\"\n```\n\n```go\nconst MaxTzNameLen = 50\n```\n\n```go\nconst WshRunEventName = \"wsh:run\"\n```\n\n## Functions\n\n```go\nfunc AutoUpdateChannel() string\n```\n\n```go\nfunc CleanOldTEvents(ctx context.Context) error\n```\n\n```go\nfunc GetNonUploadedTEvents(ctx context.Context, maxEvents int) ([]*telemetrydata.TEvent, error)\n```\n\n```go\nfunc GetTosAgreedTs() int64\n```\n\n```go\nfunc GoRecordTEventWrap(tevent *telemetrydata.TEvent)\n```\n\n```go\nfunc GoUpdateActivityWrap(update wshrpc.ActivityUpdate, debugStr string)\n```\nWraps UpdateCurrentActivity, spawns goroutine, and logs errors\n\n```go\nfunc IsAutoUpdateEnabled() bool\n```\n\n```go\nfunc IsTelemetryEnabled() bool\n```\n\n```go\nfunc MarkActivityAsUploaded(ctx context.Context, activityArr []*ActivityType) error\n```\n\n```go\nfunc MarkTEventsAsUploaded(ctx context.Context, events []*telemetrydata.TEvent) error\n```\n\n```go\nfunc RecordTEvent(ctx context.Context, tevent *telemetrydata.TEvent) error\n```\n\n```go\nfunc TruncateActivityTEventForShutdown(ctx context.Context) error\n```\n\n```go\nfunc UpdateActivity(ctx context.Context, update wshrpc.ActivityUpdate) error\n```\n\n## Types\n\n```go\ntype ActivityType struct {\n\tDay           string        `json:\"day\"`\n\tUploaded      bool          `json:\"-\"`\n\tTData         TelemetryData `json:\"tdata\"`\n\tTzName        string        `json:\"tzname\"`\n\tTzOffset      int           `json:\"tzoffset\"`\n\tClientVersion string        `json:\"clientversion\"`\n\tClientArch    string        `json:\"clientarch\"`\n\tBuildTime     string        `json:\"buildtime\"`\n\tOSRelease     string        `json:\"osrelease\"`\n}\n```\n\n```go\nfunc GetNonUploadedActivity(ctx context.Context) ([]*ActivityType, error)\n```\n\n```go\ntype TelemetryData struct {\n\tActiveMinutes       int                          `json:\"activeminutes\"`\n\tFgMinutes           int                          `json:\"fgminutes\"`\n\tOpenMinutes         int                          `json:\"openminutes\"`\n\tWaveAIActiveMinutes int                          `json:\"waveaiactiveminutes,omitempty\"`\n\tWaveAIFgMinutes     int                          `json:\"waveaifgminutes,omitempty\"`\n\tNumTabs             int                          `json:\"numtabs\"`\n\tNumBlocks           int                          `json:\"numblocks,omitempty\"`\n\tNumWindows          int                          `json:\"numwindows,omitempty\"`\n\tNumWS               int                          `json:\"numws,omitempty\"`\n\tNumWSNamed          int                          `json:\"numwsnamed,omitempty\"`\n\tNumSSHConn          int                          `json:\"numsshconn,omitempty\"`\n\tNumWSLConn          int                          `json:\"numwslconn,omitempty\"`\n\tNumMagnify          int                          `json:\"nummagnify,omitempty\"`\n\tNewTab              int                          `json:\"newtab\"`\n\tNumStartup          int                          `json:\"numstartup,omitempty\"`\n\tNumShutdown         int                          `json:\"numshutdown,omitempty\"`\n\tNumPanics           int                          `json:\"numpanics,omitempty\"`\n\tNumAIReqs           int                          `json:\"numaireqs,omitempty\"`\n\tSetTabTheme         int                          `json:\"settabtheme,omitempty\"`\n\tDisplays            []wshrpc.ActivityDisplayType `json:\"displays,omitempty\"`\n\tRenderers           map[string]int               `json:\"renderers,omitempty\"`\n\tBlocks              map[string]int               `json:\"blocks,omitempty\"`\n\tWshCmds             map[string]int               `json:\"wshcmds,omitempty\"`\n\tConn                map[string]int               `json:\"conn,omitempty\"`\n}\n```\n\n```go\nfunc (tdata *TelemetryData) Scan(val interface{}) error\n```\n\n```go\nfunc (tdata TelemetryData) Value() (driver.Value, error)\n```\n\n","path":"github.com/wavetermdev/waveterm/pkg/telemetry","name":"telemetry","synopsis":"","isRedistributable":true}
