Skip to content

Commit

Permalink
fix: metrics fields in wrong order
Browse files Browse the repository at this point in the history
this commit fixes the order which the metrics
parameters are sent, causing wrong data being
sent
Signed-off-by: Leandro Mendes <[email protected]>
  • Loading branch information
theflockers committed Nov 20, 2024
1 parent e62f7d4 commit 5a77363
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api/v1alpha1/release_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,11 @@ func (r *Release) MarkReleased() {
go metrics.RegisterCompletedRelease(
r.Status.StartTime,
r.Status.CompletionTime,
r.getPhaseReason(tenantProcessedConditionType),
r.getPhaseReason(managedProcessedConditionType),
r.getPhaseReason(finalProcessedConditionType),
SucceededReason.String(),
r.Status.Target,
r.getPhaseReason(tenantProcessedConditionType),
r.getPhaseReason(finalProcessedConditionType),
r.getPhaseReason(validatedConditionType),
)
}
Expand Down
4 changes: 2 additions & 2 deletions metrics/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,11 @@ func RegisterCompletedRelease(startTime, completionTime *metav1.Time,

// Prometheus fails if these are not in alphabetical order
labels := prometheus.Labels{
"final_pipeline_processing_reason": finalProcessingReason,
"tenant_pipeline_processing_reason": tenantProcessingReason,
"managed_pipeline_processing_reason": managedProcessingReason,
"final_pipeline_processing_reason": finalProcessingReason,
"release_reason": releaseReason,
"target": target,
"tenant_pipeline_processing_reason": tenantProcessingReason,
"validation_reason": validationReason,
}
ReleaseConcurrentTotal.WithLabelValues().Dec()
Expand Down

0 comments on commit 5a77363

Please sign in to comment.