telemetry

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package telemetry provides anonymous hardware compatibility and crash reporting

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FlushTelemetry

func FlushTelemetry()

FlushTelemetry sends all buffered events

func Initialize

func Initialize(endpoint, apiKey string, enabled bool)

Initialize sets up the telemetry system

func RecordEvent

func RecordEvent(eventType string, details map[string]interface{})

RecordEvent adds an event to the telemetry buffer

func RecordHardwareMiss

func RecordHardwareMiss(component string, details map[string]interface{})

RecordHardwareMiss records a hardware detection failure

func RecordPanic

func RecordPanic(panicValue interface{}, stackTrace []byte)

RecordPanic records a panic with stack trace

func SetAppVersion

func SetAppVersion(version string)

SetAppVersion sets the application version for telemetry

func Shutdown

func Shutdown()

Shutdown flushes any remaining events and stops the telemetry system

Types

type Client

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

Client handles sending telemetry data

func (*Client) Send

func (c *Client) Send(events []Event) error

Send transmits events to the telemetry server with retry logic

func (*Client) TestConnection

func (c *Client) TestConnection() error

TestConnection verifies connectivity to the telemetry endpoint

type Event

type Event struct {
	Timestamp  int64                  `json:"timestamp"`
	Type       string                 `json:"type"`
	AppVersion string                 `json:"app_version"`
	OS         string                 `json:"os"`
	Arch       string                 `json:"arch"`
	Details    map[string]interface{} `json:"details"`
}

Event represents a single telemetry event

Jump to

Keyboard shortcuts

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