Help us shape the future of Go! Take the 2026 Go Developer Survey

telemetry

package
v1.532.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 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()
	TemplateName      string `json:"templateName"`              // defaults to os.Getenv("PIPER_PIPELINE_TEMPLATE_NAME") or "n/a" if not set.
	StageTemplateName string `json:"stageTemplateName"`         // defaults to os.Getenv("PIPER_PIPELINE_TEMPLATE_STAGE_NAME") or "n/a" if not set.
	BinaryVersion     string `json:"binaryVersion"`             // version of the piper binary, defaults to build info
	ActionVersion     string `json:"actionVersion,omitempty"`   // version of the orchestrator action
	TemplateVersion   string `json:"templateVersion,omitempty"` // version of the pipeline template
}

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 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]any `json:"ErrorDetail"`
	BinaryVersion   string         `json:"BinaryVersion"`
	ActionVersion   string         `json:"ActionVersion,omitempty"`
	TemplateVersion string         `json:"TemplateVersion,omitempty"`
}

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
	// contains filtered or unexported fields
}

Telemetry struct which holds necessary infos about telemetry

func (*Telemetry) GetBuildURL added in v1.501.0

func (t *Telemetry) GetBuildURL() string

func (*Telemetry) GetData added in v1.180.0

func (t *Telemetry) GetData() Data

GetData returns telemetryData

func (*Telemetry) GetDataBytes added in v1.393.0

func (t *Telemetry) GetDataBytes() []byte

func (*Telemetry) Initialize added in v1.180.0

func (t *Telemetry) Initialize(stepName string)

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

func (*Telemetry) LogStepTelemetryData added in v1.425.0

func (t *Telemetry) LogStepTelemetryData()

Logs step telemetry data to logfile used for internal use-case

func (*Telemetry) SetData added in v1.180.0

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

SetData sets the custom telemetry and base data

Jump to

Keyboard shortcuts

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