telemetry

package
v0.11.6-beta.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 18 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ActivityEventName = "app:activity"
View Source
const MaxTzNameLen = 50

Variables

This section is empty.

Functions

func AutoUpdateChannel

func AutoUpdateChannel() string

func CleanOldTEvents added in v0.11.1

func CleanOldTEvents(ctx context.Context) error

func GetNonUploadedTEvents added in v0.11.1

func GetNonUploadedTEvents(ctx context.Context, maxEvents int) ([]*telemetrydata.TEvent, error)

func GetTosAgreedTs added in v0.11.5

func GetTosAgreedTs() int64

func GoRecordTEventWrap added in v0.11.1

func GoRecordTEventWrap(tevent *telemetrydata.TEvent)

func GoUpdateActivityWrap

func GoUpdateActivityWrap(update wshrpc.ActivityUpdate, debugStr string)

Wraps UpdateCurrentActivity, spawns goroutine, and logs errors

func IsAutoUpdateEnabled

func IsAutoUpdateEnabled() bool

func IsTelemetryEnabled

func IsTelemetryEnabled() bool

func MarkActivityAsUploaded

func MarkActivityAsUploaded(ctx context.Context, activityArr []*ActivityType) error

func MarkTEventsAsUploaded added in v0.11.1

func MarkTEventsAsUploaded(ctx context.Context, events []*telemetrydata.TEvent) error

func RecordTEvent added in v0.11.1

func RecordTEvent(ctx context.Context, tevent *telemetrydata.TEvent) error

func TruncateActivityTEventForShutdown added in v0.11.1

func TruncateActivityTEventForShutdown(ctx context.Context) error

func UpdateActivity

func UpdateActivity(ctx context.Context, update wshrpc.ActivityUpdate) error

Types

type ActivityType

type ActivityType struct {
	Day           string        `json:"day"`
	Uploaded      bool          `json:"-"`
	TData         TelemetryData `json:"tdata"`
	TzName        string        `json:"tzname"`
	TzOffset      int           `json:"tzoffset"`
	ClientVersion string        `json:"clientversion"`
	ClientArch    string        `json:"clientarch"`
	BuildTime     string        `json:"buildtime"`
	OSRelease     string        `json:"osrelease"`
}

func GetNonUploadedActivity

func GetNonUploadedActivity(ctx context.Context) ([]*ActivityType, error)

type TelemetryData

type TelemetryData struct {
	ActiveMinutes int                          `json:"activeminutes"`
	FgMinutes     int                          `json:"fgminutes"`
	OpenMinutes   int                          `json:"openminutes"`
	NumTabs       int                          `json:"numtabs"`
	NumBlocks     int                          `json:"numblocks,omitempty"`
	NumWindows    int                          `json:"numwindows,omitempty"`
	NumWS         int                          `json:"numws,omitempty"`
	NumWSNamed    int                          `json:"numwsnamed,omitempty"`
	NumSSHConn    int                          `json:"numsshconn,omitempty"`
	NumWSLConn    int                          `json:"numwslconn,omitempty"`
	NumMagnify    int                          `json:"nummagnify,omitempty"`
	NewTab        int                          `json:"newtab"`
	NumStartup    int                          `json:"numstartup,omitempty"`
	NumShutdown   int                          `json:"numshutdown,omitempty"`
	NumPanics     int                          `json:"numpanics,omitempty"`
	NumAIReqs     int                          `json:"numaireqs,omitempty"`
	SetTabTheme   int                          `json:"settabtheme,omitempty"`
	Displays      []wshrpc.ActivityDisplayType `json:"displays,omitempty"`
	Renderers     map[string]int               `json:"renderers,omitempty"`
	Blocks        map[string]int               `json:"blocks,omitempty"`
	WshCmds       map[string]int               `json:"wshcmds,omitempty"`
	Conn          map[string]int               `json:"conn,omitempty"`
}

func (*TelemetryData) Scan

func (tdata *TelemetryData) Scan(val interface{}) error

func (TelemetryData) Value

func (tdata TelemetryData) Value() (driver.Value, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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