splunk

package
v1.482.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: Apache-2.0 Imports: 13 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Details

type Details struct {
	Host       string `json:"host"`                 // hostname
	Source     string `json:"source,omitempty"`     // optional description of the source of the event; typically the app's name
	SourceType string `json:"sourcetype,omitempty"` // optional name of a Splunk parsing configuration; this is usually inferred by Splunk
	Index      string `json:"index,omitempty"`      // optional name of the Splunk index to store the event in; not required if the token has a default index set in Splunk
	Event      Event  `json:"event,omitempty"`      // throw any useful key/val pairs here}
}

type DetailsTelemetry added in v1.180.0

type DetailsTelemetry struct {
	Host       string                 `json:"host"`                 // hostname
	Source     string                 `json:"source,omitempty"`     // optional description of the source of the event; typically the app's name
	SourceType string                 `json:"sourcetype,omitempty"` // optional name of a Splunk parsing configuration; this is usually inferred by Splunk
	Index      string                 `json:"index,omitempty"`      // optional name of the Splunk index to store the event in; not required if the token has a default index set in Splunk
	Event      map[string]interface{} `json:"event,omitempty"`      // throw any useful key/val pairs here}
}

type Event

type Event struct {
	Messages  []log.Message  `json:"messages,omitempty"`  // messages
	Telemetry MonitoringData `json:"telemetry,omitempty"` // telemetryData
}

type LogFileEvent added in v1.200.0

type LogFileEvent struct {
	Event      string `json:"event"`      // messages
	Host       string `json:"host"`       // hostname
	Source     string `json:"source"`     // optional description of the source of the event; typically the app's name
	SourceType string `json:"sourcetype"` // optional name of a Splunk parsing configuration; this is usually inferred by Splunk
	Index      string `json:"index"`      // optional name of the Splunk index to store the event in; not required if the token has a default index set in Splunk
}

type MonitoringData

type MonitoringData struct {
	PipelineUrlHash   string `json:"PipelineUrlHash,omitempty"`
	BuildUrlHash      string `json:"BuildUrlHash,omitempty"`
	Orchestrator      string `json:"Orchestrator,omitempty"`
	TemplateName      string `json:"TemplateName,omitempty"`
	StageTemplateName string `json:"StageTemplateName,omitempty"`
	PiperCommitHash   string `json:"PiperCommitHash,omitempty"`
	StageName         string `json:"StageName,omitempty"`
	StepName          string `json:"StepName,omitempty"`
	ExitCode          string `json:"ExitCode,omitempty"`
	Duration          string `json:"Duration,omitempty"`
	ErrorCode         string `json:"ErrorCode,omitempty"`
	ErrorCategory     string `json:"ErrorCategory,omitempty"`
	ErrorMessage      string `json:"ErrorMessage,omitempty"`
	CorrelationID     string `json:"CorrelationId,omitempty"`
	CommitHash        string `json:"CommitHash,omitempty"`
	Branch            string `json:"Branch,omitempty"`
	GitOwner          string `json:"GitOwner,omitempty"`
	GitRepository     string `json:"GitRepository,omitempty"`
	BinaryVersion     string `json:"BinaryVersion,omitempty"`
	ActionVersion     string `json:"ActionVersion,omitempty"`
	TemplateVersion   string `json:"TemplateVersion,omitempty"`
}

MonitoringData definition for monitoring

type Splunk

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

Splunk SplunkHook provides a logrus hook which enables error logging to splunk platform. This is helpful in order to provide better monitoring and alerting on errors as well as the given error details can help to find the root cause of bugs.

func (*Splunk) Initialize added in v1.180.0

func (s *Splunk) Initialize(correlationID, dsn, token, index string, sendLogs bool) error

func (*Splunk) Send added in v1.180.0

func (s *Splunk) Send(telemetryData telemetry.Data, logCollector *log.CollectorHook) error

func (*Splunk) SendPipelineStatus added in v1.180.0

func (s *Splunk) SendPipelineStatus(pipelineTelemetryData map[string]interface{}, logFile *[]byte) error

Jump to

Keyboard shortcuts

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