analytics

package
v0.7.22 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MPL-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCLIProject added in v0.7.0

func AddCLIProject(org, project string)

func AddEarthfileProject added in v0.7.0

func AddEarthfileProject(org, project string)

func CollectAnalytics

func CollectAnalytics(ctx context.Context, cloudClient *cloud.Client, displayErrors bool, meta Meta, installationName string)

CollectAnalytics sends analytics to api.earthly.dev

func Count added in v0.6.15

func Count(subsystem, key string)

Count increases the global count of (subsystem, key) which then gets reported when CollectAnalytics is called.

func DetectCI added in v0.6.28

func DetectCI(isEarthlyCIRunner bool) (string, bool)

DetectCI determines if Earthly is being run from a CI environment. It returns the name of the CI tool and true if we detect one.

func ProjectDetails added in v0.7.0

func ProjectDetails() (string, string)

Types

type Counters added in v0.6.15

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

Counters is a threadsafe collection of counters

func (*Counters) Count added in v0.6.15

func (c *Counters) Count(subsystem, key string)

Count increases the global count of (subsystem, key) which then gets reported when CollectAnalytics is called.

type Meta added in v0.6.20

type Meta struct {
	Version          string
	Platform         string
	BuildkitPlatform string
	UserPlatform     string
	GitSHA           string
	CommandName      string
	ExitCode         int
	Target           domain.Target
	IsSatellite      bool
	SatelliteVersion string
	IsRemoteBuildkit bool
	Realtime         time.Duration
	OrgName          string
	ProjectName      string
	EarthlyCIRunner  bool
}

Meta holds metadata about the current run of the program.

type ProjectTracker added in v0.7.0

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

func (*ProjectTracker) AddCLIProject added in v0.7.0

func (pt *ProjectTracker) AddCLIProject(org, project string)

func (*ProjectTracker) AddEarthfileProject added in v0.7.0

func (pt *ProjectTracker) AddEarthfileProject(org, project string)

func (*ProjectTracker) ProjectDetails added in v0.7.0

func (pt *ProjectTracker) ProjectDetails() (string, string)

Jump to

Keyboard shortcuts

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