analytics

package
v1.2.28 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIHostLocal            = "local"
	APIHostExternal         = "external"
	APIHostTestkubeInternal = "testkube-internal"
)

Variables

View Source
var TestkubeMeasurementID = "" //this is default but it can be set using ldflag -X github.com/kubeshop/testkube/pkg/analytics.TestkubeMeasurementID=G-B6KY2SF30K
View Source
var TestkubeMeasurementSecret = ""

Functions

func AnonymizeHost added in v1.1.6

func AnonymizeHost(host string) string

func MachineID

func MachineID() string

MachineID returns unique user machine ID

func SendAnonymousAPIRequestInfo added in v1.0.10

func SendAnonymousAPIRequestInfo(host, path, version, method, clusterId string) (string, error)

SendAnonymousCmdInfo will send CLI event to GA

func SendAnonymousCmdInfo added in v1.0.6

func SendAnonymousCmdInfo(cmd *cobra.Command, version string) (string, error)

SendAnonymousCmdInfo will send CLI event to GA

func SendCmdInit added in v1.0.16

func SendCmdInit(cmd *cobra.Command, version string) (string, error)

SendCmdInit will send CLI event to GA

func SendServerStartAnonymousInfo added in v1.0.10

func SendServerStartAnonymousInfo() (string, error)

SendServerStartAnonymousInfo will send event to GA

Types

type Event added in v0.11.2

type Event struct {
	Name   string `json:"name"`
	Params Params `json:"params,omitempty"`
}

type Params added in v0.11.2

type Params struct {
	EventCount       int64  `json:"event_count,omitempty"`
	EventCategory    string `json:"event_category,omitempty"`
	AppVersion       string `json:"app_version,omitempty"`
	AppName          string `json:"app_name,omitempty"`
	CustomDimensions string `json:"custom_dimensions,omitempty"`
	DataSource       string `json:"data_source,omitempty"`
	Host             string `json:"host,omitempty"`
	MachineID        string `json:"machine_id,omitempty"`
	ClusterID        string `json:"cluster_id,omitempty"`
	OperatingSystem  string `json:"operating_system,omitempty"`
	Architecture     string `json:"architecture,omitempty"`
}

type Payload added in v0.11.2

type Payload struct {
	UserID   string  `json:"user_id,omitempty"`
	ClientID string  `json:"client_id,omitempty"`
	Events   []Event `json:"events,omitempty"`
}

Jump to

Keyboard shortcuts

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