telemetry

package
v1.2.129 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TracesURL = "https://telemetry.werf.io/v1/traces"
)

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, opts TelemetryOptions) error

func IsEnabled

func IsEnabled() bool

func LogF added in v1.2.128

func LogF(f string, args ...interface{})

func NewTraceExporter added in v1.2.119

func NewTraceExporter(url string) (*otlptrace.Exporter, error)

func Shutdown

func Shutdown(ctx context.Context) error

Types

type CommandExited added in v1.2.128

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

func NewCommandExited added in v1.2.128

func NewCommandExited(exitCode int) *CommandExited

func (*CommandExited) GetData added in v1.2.128

func (e *CommandExited) GetData() interface{}

func (*CommandExited) GetType added in v1.2.128

func (e *CommandExited) GetType() EventType

type CommandOption added in v1.2.128

type CommandOption struct {
	Name  string `json:"name"`
	AsCli bool   `json:"asCli"`
	AsEnv bool   `json:"asEnv"`
	Count int    `json:"count"`
}

type CommandStarted added in v1.2.128

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

func NewCommandStarted added in v1.2.128

func NewCommandStarted(commandOptions []CommandOption) *CommandStarted

func (*CommandStarted) GetData added in v1.2.128

func (e *CommandStarted) GetData() interface{}

func (*CommandStarted) GetType added in v1.2.128

func (e *CommandStarted) GetType() EventType

type Event added in v1.2.128

type Event interface {
	GetType() EventType
	GetData() interface{}
}

type EventType added in v1.2.122

type EventType string
const (
	CommandStartedEvent EventType = "CommandStarted"
	CommandExitedEvent  EventType = "CommandExited"
)

type NoTelemetryWerfIO added in v1.2.120

type NoTelemetryWerfIO struct{}

func (*NoTelemetryWerfIO) CommandExited added in v1.2.128

func (t *NoTelemetryWerfIO) CommandExited(context.Context, int)

func (*NoTelemetryWerfIO) CommandStarted added in v1.2.120

func (t *NoTelemetryWerfIO) CommandStarted(context.Context)

func (*NoTelemetryWerfIO) SetCommand added in v1.2.120

func (t *NoTelemetryWerfIO) SetCommand(context.Context, string)

func (*NoTelemetryWerfIO) SetCommandOptions added in v1.2.128

func (t *NoTelemetryWerfIO) SetCommandOptions(context.Context, []CommandOption)

func (*NoTelemetryWerfIO) SetProjectID added in v1.2.120

func (t *NoTelemetryWerfIO) SetProjectID(context.Context, string)

type TelemetryOptions added in v1.2.121

type TelemetryOptions struct {
	ErrorHandlerFunc func(err error)
}

type TelemetryWerfIO added in v1.2.120

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

func NewTelemetryWerfIO added in v1.2.120

func NewTelemetryWerfIO(url string, opts TelemetryWerfIOOptions) (*TelemetryWerfIO, error)

func (*TelemetryWerfIO) CommandExited added in v1.2.128

func (t *TelemetryWerfIO) CommandExited(ctx context.Context, exitCode int)

func (*TelemetryWerfIO) CommandStarted added in v1.2.120

func (t *TelemetryWerfIO) CommandStarted(ctx context.Context)

func (*TelemetryWerfIO) SetCommand added in v1.2.120

func (t *TelemetryWerfIO) SetCommand(ctx context.Context, command string)

func (*TelemetryWerfIO) SetCommandOptions added in v1.2.128

func (t *TelemetryWerfIO) SetCommandOptions(ctx context.Context, options []CommandOption)

func (*TelemetryWerfIO) SetProjectID added in v1.2.120

func (t *TelemetryWerfIO) SetProjectID(ctx context.Context, projectID string)

func (*TelemetryWerfIO) Shutdown added in v1.2.120

func (t *TelemetryWerfIO) Shutdown(ctx context.Context) error

func (*TelemetryWerfIO) Start added in v1.2.120

func (t *TelemetryWerfIO) Start(ctx context.Context) error

type TelemetryWerfIOInterface added in v1.2.120

type TelemetryWerfIOInterface interface {
	SetProjectID(ctx context.Context, projectID string)
	SetCommand(ctx context.Context, command string)
	SetCommandOptions(ctx context.Context, options []CommandOption)

	CommandStarted(ctx context.Context)
	CommandExited(ctx context.Context, exitCode int)
}

func GetTelemetryWerfIO added in v1.2.120

func GetTelemetryWerfIO() TelemetryWerfIOInterface

type TelemetryWerfIOOptions added in v1.2.122

type TelemetryWerfIOOptions struct {
	HandleErrorFunc func(err error)
}

Jump to

Keyboard shortcuts

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