Documentation
¶
Index ¶
- Constants
- func GetTraceUrl() string
- func Init(ctx context.Context, opts TelemetryOptions) error
- func IsEnabled() bool
- func LogF(f string, args ...interface{})
- func NewTraceExporter(url string) (*otlptrace.Exporter, error)
- func Shutdown(ctx context.Context) error
- type BuildFinished
- type BuildStarted
- type CommandExited
- type CommandOption
- type CommandStarted
- type Event
- type EventType
- type ImageBuildFinished
- type NoTelemetryWerfIO
- func (t *NoTelemetryWerfIO) BuildFinished(context.Context, bool)
- func (t *NoTelemetryWerfIO) BuildStarted(context.Context, int, string, bool)
- func (t *NoTelemetryWerfIO) CommandExited(context.Context, int)
- func (t *NoTelemetryWerfIO) CommandStarted(context.Context)
- func (t *NoTelemetryWerfIO) ImageBuildFinished(context.Context, string, int64, bool, string)
- func (t *NoTelemetryWerfIO) SetCommand(context.Context, string)
- func (t *NoTelemetryWerfIO) SetCommandOptions(context.Context, []CommandOption)
- func (t *NoTelemetryWerfIO) SetProjectID(context.Context, string)
- func (t *NoTelemetryWerfIO) SetUserID(context.Context, string)
- func (t *NoTelemetryWerfIO) StageBuildFinished(context.Context, string, string, int64, bool, string, bool)
- func (t *NoTelemetryWerfIO) UnshallowFailed(context.Context, error)
- type StageBuildFinished
- type TelemetryOptions
- type TelemetryWerfIO
- func (t *TelemetryWerfIO) BuildFinished(ctx context.Context, success bool)
- func (t *TelemetryWerfIO) BuildStarted(ctx context.Context, imagesCount int, containerBackend string, ...)
- func (t *TelemetryWerfIO) CommandExited(ctx context.Context, exitCode int)
- func (t *TelemetryWerfIO) CommandStarted(ctx context.Context)
- func (t *TelemetryWerfIO) ImageBuildFinished(ctx context.Context, image string, durationMs int64, rebuilt bool, ...)
- func (t *TelemetryWerfIO) SetCommand(ctx context.Context, command string)
- func (t *TelemetryWerfIO) SetCommandOptions(ctx context.Context, options []CommandOption)
- func (t *TelemetryWerfIO) SetProjectID(ctx context.Context, projectID string)
- func (t *TelemetryWerfIO) SetUserID(_ context.Context, userID string)
- func (t *TelemetryWerfIO) Shutdown(ctx context.Context) error
- func (t *TelemetryWerfIO) StageBuildFinished(ctx context.Context, image, stage string, durationMs int64, fromCache bool, ...)
- func (t *TelemetryWerfIO) Start(ctx context.Context) error
- func (t *TelemetryWerfIO) UnshallowFailed(ctx context.Context, err error)
- type TelemetryWerfIOInterface
- type TelemetryWerfIOOptions
- type UnshallowFailed
Constants ¶
View Source
const ( TracesURL = "https://telemetry.werf.io/v1/traces" TelemetryEnv = "WERF_TELEMETRY" )
Variables ¶
This section is empty.
Functions ¶
func GetTraceUrl ¶
func GetTraceUrl() string
Types ¶
type BuildFinished ¶ added in v2.58.0
type BuildFinished struct {
DurationMs int64 `json:"durationMs"`
Success bool `json:"success"`
ImagesCount int `json:"imagesCount"`
}
func NewBuildFinished ¶ added in v2.58.0
func NewBuildFinished(durationMs int64, success bool, imagesCount int) *BuildFinished
func (*BuildFinished) GetType ¶ added in v2.58.0
func (*BuildFinished) GetType() EventType
type BuildStarted ¶ added in v2.58.0
type BuildStarted struct {
ImagesCount int `json:"imagesCount"`
ContainerBackend string `json:"containerBackend"`
InContainer bool `json:"inContainer"`
}
func NewBuildStarted ¶ added in v2.58.0
func NewBuildStarted(imagesCount int, containerBackend string, inContainer bool) *BuildStarted
func (*BuildStarted) GetType ¶ added in v2.58.0
func (*BuildStarted) GetType() EventType
type CommandExited ¶
func NewCommandExited ¶
func NewCommandExited(exitCode int, durationMs int64) *CommandExited
func (*CommandExited) GetType ¶
func (e *CommandExited) GetType() EventType
type CommandOption ¶
type CommandStarted ¶
type CommandStarted struct {
CommandOptions []CommandOption `json:"commandOptions,omitempty"`
}
func NewCommandStarted ¶
func NewCommandStarted(commandOptions []CommandOption) *CommandStarted
func (*CommandStarted) GetType ¶
func (e *CommandStarted) GetType() EventType
type EventType ¶
type EventType string
const ( CommandStartedEvent EventType = "CommandStarted" CommandExitedEvent EventType = "CommandExited" UnshallowFailedEvent EventType = "UnshallowFailed" BuildStartedEvent EventType = "BuildStarted" BuildFinishedEvent EventType = "BuildFinished" ImageBuildFinishedEvent EventType = "ImageBuildFinished" StageBuildFinishedEvent EventType = "StageBuildFinished" )
type ImageBuildFinished ¶ added in v2.58.0
type ImageBuildFinished struct {
Image string `json:"image"`
DurationMs int64 `json:"durationMs"`
Rebuilt bool `json:"rebuilt"`
ConfigType string `json:"configType,omitempty"`
}
func NewImageBuildFinished ¶ added in v2.58.0
func NewImageBuildFinished(image string, durationMs int64, rebuilt bool) *ImageBuildFinished
func (*ImageBuildFinished) GetType ¶ added in v2.58.0
func (*ImageBuildFinished) GetType() EventType
type NoTelemetryWerfIO ¶
type NoTelemetryWerfIO struct{}
func (*NoTelemetryWerfIO) BuildFinished ¶ added in v2.58.0
func (t *NoTelemetryWerfIO) BuildFinished(context.Context, bool)
func (*NoTelemetryWerfIO) BuildStarted ¶ added in v2.58.0
func (*NoTelemetryWerfIO) CommandExited ¶
func (t *NoTelemetryWerfIO) CommandExited(context.Context, int)
func (*NoTelemetryWerfIO) CommandStarted ¶
func (t *NoTelemetryWerfIO) CommandStarted(context.Context)
func (*NoTelemetryWerfIO) ImageBuildFinished ¶ added in v2.58.0
func (*NoTelemetryWerfIO) SetCommand ¶
func (t *NoTelemetryWerfIO) SetCommand(context.Context, string)
func (*NoTelemetryWerfIO) SetCommandOptions ¶
func (t *NoTelemetryWerfIO) SetCommandOptions(context.Context, []CommandOption)
func (*NoTelemetryWerfIO) SetProjectID ¶
func (t *NoTelemetryWerfIO) SetProjectID(context.Context, string)
func (*NoTelemetryWerfIO) SetUserID ¶
func (t *NoTelemetryWerfIO) SetUserID(context.Context, string)
func (*NoTelemetryWerfIO) StageBuildFinished ¶ added in v2.58.0
func (*NoTelemetryWerfIO) UnshallowFailed ¶
func (t *NoTelemetryWerfIO) UnshallowFailed(context.Context, error)
type StageBuildFinished ¶ added in v2.58.0
type StageBuildFinished struct {
Image string `json:"image"`
Stage string `json:"stage"`
DurationMs int64 `json:"durationMs"`
FromCache bool `json:"fromCache"`
BaseImageSource string `json:"baseImageSource"`
BaseImagePulled bool `json:"baseImagePulled"`
}
func NewStageBuildFinished ¶ added in v2.58.0
func NewStageBuildFinished(image, stage string, durationMs int64, fromCache bool) *StageBuildFinished
func (*StageBuildFinished) GetType ¶ added in v2.58.0
func (*StageBuildFinished) GetType() EventType
type TelemetryOptions ¶
type TelemetryOptions struct {
ErrorHandlerFunc func(err error)
}
type TelemetryWerfIO ¶
type TelemetryWerfIO struct {
// contains filtered or unexported fields
}
func NewTelemetryWerfIO ¶
func NewTelemetryWerfIO(url string, opts TelemetryWerfIOOptions) (*TelemetryWerfIO, error)
func (*TelemetryWerfIO) BuildFinished ¶ added in v2.58.0
func (t *TelemetryWerfIO) BuildFinished(ctx context.Context, success bool)
func (*TelemetryWerfIO) BuildStarted ¶ added in v2.58.0
func (*TelemetryWerfIO) CommandExited ¶
func (t *TelemetryWerfIO) CommandExited(ctx context.Context, exitCode int)
func (*TelemetryWerfIO) CommandStarted ¶
func (t *TelemetryWerfIO) CommandStarted(ctx context.Context)
func (*TelemetryWerfIO) ImageBuildFinished ¶ added in v2.58.0
func (*TelemetryWerfIO) SetCommand ¶
func (t *TelemetryWerfIO) SetCommand(ctx context.Context, command string)
func (*TelemetryWerfIO) SetCommandOptions ¶
func (t *TelemetryWerfIO) SetCommandOptions(ctx context.Context, options []CommandOption)
func (*TelemetryWerfIO) SetProjectID ¶
func (t *TelemetryWerfIO) SetProjectID(ctx context.Context, projectID string)
func (*TelemetryWerfIO) SetUserID ¶
func (t *TelemetryWerfIO) SetUserID(_ context.Context, userID string)
func (*TelemetryWerfIO) StageBuildFinished ¶ added in v2.58.0
func (*TelemetryWerfIO) UnshallowFailed ¶
func (t *TelemetryWerfIO) UnshallowFailed(ctx context.Context, err error)
type TelemetryWerfIOInterface ¶
type TelemetryWerfIOInterface interface {
SetUserID(ctx context.Context, projectID string)
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)
UnshallowFailed(ctx context.Context, err error)
BuildStarted(ctx context.Context, imagesCount int, containerBackend string, inContainer bool)
BuildFinished(ctx context.Context, success bool)
ImageBuildFinished(ctx context.Context, image string, durationMs int64, rebuilt bool, configType string)
StageBuildFinished(ctx context.Context, image, stage string, durationMs int64, fromCache bool, baseImageSource string, baseImagePulled bool)
}
func GetTelemetryWerfIO ¶
func GetTelemetryWerfIO() TelemetryWerfIOInterface
type TelemetryWerfIOOptions ¶
type TelemetryWerfIOOptions struct {
HandleErrorFunc func(err error)
}
type UnshallowFailed ¶
type UnshallowFailed struct {
ErrorMessage string `json:"errorMessage"`
GitlabRunnerVersion string `json:"gitlabRunnerVersion"`
GitlabServerVersion string `json:"gitlabServerVersion"`
}
func NewUnshallowFailed ¶
func NewUnshallowFailed(errorMessage string) *UnshallowFailed
func (*UnshallowFailed) GetType ¶
func (*UnshallowFailed) GetType() EventType
Click to show internal directories.
Click to hide internal directories.