Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ type dataMetric struct {
Name string
Namespace string
UID string
Type string
Phase v1alpha2.VMOPPhase
}

Expand All @@ -36,5 +37,6 @@ func newDataMetric(vmop *v1alpha2.VirtualMachineOperation) *dataMetric {
Namespace: vmop.Namespace,
UID: string(vmop.UID),
Phase: vmop.Status.Phase,
Type: string(vmop.Spec.Type),
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const (
MetricVMOPStatusPhase = "virtualmachineoperation_status_phase"
)

var baseLabels = []string{"name", "namespace", "uid"}
var baseLabels = []string{"name", "namespace", "uid", "type"}

func WithBaseLabels(labels ...string) []string {
return append(baseLabels, labels...)
Expand All @@ -39,6 +39,7 @@ func WithBaseLabelsByMetric(m *dataMetric, labels ...string) []string {
m.Name,
m.Namespace,
m.UID,
m.Type,
}
}
return append(base, labels...)
Expand Down
Loading