Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(Splunk): expose orchestrator to Splunk #5243

Merged
merged 4 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkg/splunk/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ type Details struct {
type MonitoringData struct {
PipelineUrlHash string `json:"PipelineUrlHash,omitempty"`
BuildUrlHash string `json:"BuildUrlHash,omitempty"`
Orchestrator string `json:"Orchestrator,omitempty"`
StageName string `json:"StageName,omitempty"`
StepName string `json:"StepName,omitempty"`
ExitCode string `json:"ExitCode,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions pkg/splunk/splunk.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ func (s *Splunk) prepareTelemetry(telemetryData telemetry.Data) MonitoringData {
monitoringData := MonitoringData{
PipelineUrlHash: telemetryData.PipelineURLHash,
BuildUrlHash: telemetryData.BuildURLHash,
Orchestrator: telemetryData.Orchestrator,
StageName: telemetryData.StageName,
StepName: telemetryData.BaseData.StepName,
ExitCode: telemetryData.CustomData.ErrorCode,
Expand Down
5 changes: 4 additions & 1 deletion pkg/splunk/splunk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,9 @@ func Test_prepareTelemetry(t *testing.T) {
{name: "Testing prepare telemetry information",
args: args{
telemetryData: telemetry.Data{
BaseData: telemetry.BaseData{},
BaseData: telemetry.BaseData{
Orchestrator: "Jenkins",
},
CustomData: telemetry.CustomData{
Duration: "1234",
ErrorCode: "0",
Expand All @@ -365,6 +367,7 @@ func Test_prepareTelemetry(t *testing.T) {
want: MonitoringData{
PipelineUrlHash: "",
BuildUrlHash: "",
Orchestrator: "Jenkins",
StageName: "",
StepName: "",
ExitCode: "0",
Expand Down
Loading