telemetry

package
v1.358.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LibraryRepository string

LibraryRepository that is passed into with -ldflags

Functions

This section is empty.

Types

type BaseData

type BaseData struct {
	ActionName      string `json:"actionName"`
	EventType       string `json:"eventType"`
	SiteID          string `json:"idsite"`
	URL             string `json:"url"`
	StepName        string `json:"stepName"` // set by step generator
	StageName       string `json:"stageName"`
	PipelineURLHash string `json:"pipelineUrlHash"` // defaults to sha1 of provider.GetBuildURL()
	BuildURLHash    string `json:"buildUrlHash"`    // defaults to sha1 of provider.GetJobURL()
	Orchestrator    string `json:"orchestrator"`    // defaults to provider.OrchestratorType()
}

BaseData object definition containing the base data

type CustomData

type CustomData struct {
	Duration              string `json:"duration,omitempty"`
	ErrorCode             string `json:"errorCode,omitempty"`
	ErrorCategory         string `json:"errorCategory,omitempty"`
	PiperCommitHash       string `json:"piperCommitHash,omitempty"`
	BuildTool             string `json:"buildTool,omitempty"`
	FilePath              string `json:"filePath,omitempty"`
	DeployTool            string `json:"deployTool,omitempty"`
	ContainerBuildOptions string `json:"containerBuildOptions,omitempty"`
	IsScheduled           bool   `json:"isScheduled,omitempty"`
	IsOptimized           bool   `json:"isOptimized,omitempty"`
	ProxyLogFile          string `json:"proxyLogFile,omitempty"`
	BuildType             string `json:"buildType,omitempty"`
	BuildQuality          string `json:"buildQuality,omitempty"`
	LegacyJobNameTemplate string `json:"legacyJobNameTemplate,omitempty"`
	LegacyJobName         string `json:"legacyJobName,omitempty"`
	DeployType            string `json:"deployType,omitempty"`
	CnbBuilder            string `json:"cnbBuilder,omitempty"`
	CnbRunImage           string `json:"cnbRunImage,omitempty"`
	ServerURL             string `json:"serverURL,omitempty"`
	ECCNMessageStatus     string `json:"eccnMessageStatus,omitempty"`
	ChangeRequestUpload   string `json:"changeRequestUpload,omitempty"`
	BuildVersionCreation  string `json:"buildVersionCreation,omitempty"`
	PullRequestMode       string `json:"pullRequestMode,omitempty"`
	GroovyTemplateUsed    string `json:"groovyTemplateUsed,omitempty"`
}

CustomData object definition containing the data that can be set by a step

type Data

type Data struct {
	BaseData
	CustomData
}

Data object definition containing all telemetry data

type Pendo added in v1.344.0

type Pendo struct {
	Type       string `json:"type"`
	Event      string `json:"event"`
	VisitorID  string `json:"visitorId"`
	AccountID  string `json:"accountId"`
	Timestamp  int64  `json:"timestamp"`
	Properties *Data  `json:"properties"`
}

type StepTelemetryData added in v1.197.0

type StepTelemetryData struct {
	StepStartTime   string                 `json:"StepStartTime"`
	PipelineURLHash string                 `json:"PipelineURLHash"`
	BuildURLHash    string                 `json:"BuildURLHash"`
	StageName       string                 `json:"StageName"`
	StepName        string                 `json:"StepName"`
	ErrorCode       string                 `json:"ErrorCode"`
	StepDuration    string                 `json:"StepDuration"`
	ErrorCategory   string                 `json:"ErrorCategory"`
	CorrelationID   string                 `json:"CorrelationID"`
	PiperCommitHash string                 `json:"PiperCommitHash"`
	ErrorDetail     map[string]interface{} `json:"ErrorDetail"`
}

StepTelemetryData definition for telemetry reporting and monitoring

type Telemetry added in v1.180.0

type Telemetry struct {
	CustomReportingDsn   string
	CustomReportingToken string

	BaseURL    string
	Endpoint   string
	SiteID     string
	PendoToken string
	Pendo      Pendo
	// contains filtered or unexported fields
}

Telemetry struct which holds necessary infos about telemetry

func (*Telemetry) GetData added in v1.180.0

func (t *Telemetry) GetData() Data

GetData returns telemetryData

func (*Telemetry) Initialize added in v1.180.0

func (t *Telemetry) Initialize(telemetryDisabled bool, stepName, token string)

Initialize sets up the base telemetry data and is called in generated part of the steps

func (*Telemetry) Send added in v1.180.0

func (t *Telemetry) Send()

Send telemetry information to SWA

func (*Telemetry) SetData added in v1.180.0

func (t *Telemetry) SetData(customData *CustomData)

SetData sets the custom telemetry, Pendo and base data

Jump to

Keyboard shortcuts

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