analytics

package
v2.8.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DisabledEnvKey controls both the old (analytics plugin) and new (v2) implementations
	DisabledEnvKey = "BITRISE_ANALYTICS_DISABLED"
	// V2DisabledEnvKey controls only the new (v2) implementation
	V2DisabledEnvKey = "BITRISE_ANALYTICS_V2_DISABLED"
	// V2AsyncDisabledEnvKey can be used to disable the default async queries
	V2AsyncDisabledEnvKey = "BITRISE_ANALYTICS_V2_ASYNC_DISABLED"
)
View Source
const (
	// BuildExecutionID ...
	BuildExecutionID = "build_execution_id"
	// WorkflowExecutionID ...
	WorkflowExecutionID = "workflow_execution_id"
	// StepExecutionID ...
	StepExecutionID = "step_execution_id"

	// StepExecutionIDEnvKey ...
	StepExecutionIDEnvKey = "BITRISE_STEP_EXECUTION_ID"
)

Variables

This section is empty.

Functions

func LogMessage

func LogMessage(logLevel string, stepID string, tag string, data map[string]interface{}, format string, v ...interface{})

LogMessage sends the log message to the configured analytics server

Types

type Input

type Input struct {
	Value         interface{} `json:"value"`
	OriginalValue string      `json:"original_value,omitempty"`
}

Input ...

type StateChecker

type StateChecker interface {
	Enabled() bool
	UseAsync() bool
}

StateChecker ...

func NewStateChecker

func NewStateChecker(repository env.Repository) StateChecker

NewStateChecker ...

type StepInfo

type StepInfo struct {
	StepID      string
	StepTitle   string
	StepVersion string
	StepSource  string
	Skippable   bool
}

StepInfo ...

type StepResult

type StepResult struct {
	Info                     StepInfo
	Status                   models.StepRunStatus
	ErrorMessage             string
	Timeout, NoOutputTimeout time.Duration
}

StepResult ...

type Tracker

type Tracker interface {
	SendWorkflowStarted(properties analytics.Properties, name string, title string)
	SendWorkflowFinished(properties analytics.Properties, failed bool)
	SendStepStartedEvent(properties analytics.Properties, info StepInfo, expandedInputs map[string]interface{}, originalInputs map[string]string)
	SendStepFinishedEvent(properties analytics.Properties, result StepResult)
	SendCLIWarning(message string)
	Wait()
}

Tracker ...

func NewDefaultTracker

func NewDefaultTracker() Tracker

NewDefaultTracker ...

func NewTracker

func NewTracker(analyticsTracker analytics.Tracker, envRepository env.Repository, stateChecker StateChecker) Tracker

NewTracker ...

Jump to

Keyboard shortcuts

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