Skip to content

Commit

Permalink
Use windows constant
Browse files Browse the repository at this point in the history
  • Loading branch information
KlwntSingh committed Feb 29, 2024
1 parent b4ccbb2 commit 1c1d8ba
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (k *K8sWindows) decorateMetrics(cadvisormetrics []*cExtractor.CAdvisorMetri
tags[ci.ClusterNameKey] = k.hostInfo.GetClusterName()

// add tags for OS
tags[ci.OperatingSystem] = "windows"
tags[ci.OperatingSystem] = ci.OperatingSystemWindows

out := k.k8sDecorator.Decorate(m)
if out != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ func stringInRuneset(name, subset string) bool {
}

func TagMetricSource(metric CIMetric) {
if metric.GetTag(ci.OperatingSystem) == "windows" {
if metric.GetTag(ci.OperatingSystem) == ci.OperatingSystemWindows {
tagMetricSourceWindows(metric)
return
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func TestUtils_TagMetricSourceWindows(t *testing.T) {
for i, mtype := range types {
tags := map[string]string{
ci.MetricType: mtype,
ci.OperatingSystem: "windows",
ci.OperatingSystem: ci.OperatingSystemWindows,
}

metric := &mockCIMetric{
Expand Down

0 comments on commit 1c1d8ba

Please sign in to comment.