Skip to content

Commit cccb8e9

Browse files
authored
Reduce the github_workflow_job_step_run_duration_seconds cardinality (#21)
I made a mistake and started sending the addresses in memory instead of values for the step_number label. THis time I remove the label completely, if we find it useful, I will introduce it properly again. but for now it is okay to drop
1 parent ee7c975 commit cccb8e9

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

pkg/actionsmetrics/event_reader.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,9 +216,7 @@ func (reader *EventReader) ProcessWorkflowJobEvent(ctx context.Context, event in
216216
if *e.WorkflowJob.Conclusion == "success" && repoName == "client" {
217217
for _, step := range e.WorkflowJob.Steps {
218218
stepLabels := extraLabel("step_name", *step.Name, labels)
219-
stepLabels["step_number"] = fmt.Sprint(step.Number)
220219
stepLabels["step_conclusion"] = *step.Conclusion
221-
stepLabels["step_status"] = *step.Status
222220

223221
stepDuration := step.CompletedAt.Sub(step.StartedAt.Time)
224222

pkg/actionsmetrics/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func initGithubWorkflowJobStepDurationSeconds(buckets []float64) *prometheus.His
154154
Help: "Run times for the steps in workflow jobs in seconds",
155155
Buckets: buckets,
156156
},
157-
metricLabels("step_name", "step_number", "step_conclusion", "step_status"),
157+
metricLabels("step_name", "step_conclusion"),
158158
)
159159
}
160160

0 commit comments

Comments
 (0)