Skip to content

Commit

Permalink
Use windows constant
Browse files Browse the repository at this point in the history
  • Loading branch information
KlwntSingh committed Mar 2, 2024
1 parent 48b10f8 commit e19435c
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(windowsmetrics []*stores.RawContainerInsigh
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 @@ -98,7 +98,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 @@ -233,7 +233,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 e19435c

Please sign in to comment.