From 3e47500ac08a8edc7478bb27417a1a46a25b4329 Mon Sep 17 00:00:00 2001 From: Sergey Nikitin Date: Thu, 11 Sep 2025 15:44:12 +0200 Subject: [PATCH] Reduce the github_workflow_job_step_run_duration_seconds cardinality 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 --- pkg/actionsmetrics/event_reader.go | 2 -- pkg/actionsmetrics/metrics.go | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/actionsmetrics/event_reader.go b/pkg/actionsmetrics/event_reader.go index f6f5b5902a..3800052975 100644 --- a/pkg/actionsmetrics/event_reader.go +++ b/pkg/actionsmetrics/event_reader.go @@ -216,9 +216,7 @@ func (reader *EventReader) ProcessWorkflowJobEvent(ctx context.Context, event in if *e.WorkflowJob.Conclusion == "success" && repoName == "client" { for _, step := range e.WorkflowJob.Steps { stepLabels := extraLabel("step_name", *step.Name, labels) - stepLabels["step_number"] = fmt.Sprint(step.Number) stepLabels["step_conclusion"] = *step.Conclusion - stepLabels["step_status"] = *step.Status stepDuration := step.CompletedAt.Sub(step.StartedAt.Time) diff --git a/pkg/actionsmetrics/metrics.go b/pkg/actionsmetrics/metrics.go index c31cf4c3ae..6e0acc680d 100644 --- a/pkg/actionsmetrics/metrics.go +++ b/pkg/actionsmetrics/metrics.go @@ -154,7 +154,7 @@ func initGithubWorkflowJobStepDurationSeconds(buckets []float64) *prometheus.His Help: "Run times for the steps in workflow jobs in seconds", Buckets: buckets, }, - metricLabels("step_name", "step_number", "step_conclusion", "step_status"), + metricLabels("step_name", "step_conclusion"), ) }