Skip to content

Commit

Permalink
OM92 - review feedback
Browse files Browse the repository at this point in the history
removed additional _ (underscore) which is appended to the metric
  • Loading branch information
mphanias committed Jul 24, 2023
1 parent 3c4ed06 commit 6a0c7d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions watcher_xdr.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ func (xw *XdrWatcher) constructMetricNamePrefix(infoKeyToProcess string) (string
// either this is a config key or a stat having namespace (both are new use-cases) hence handle here

if cfgOk && nsOk {
return dcName, nsName, ("dc_namespace")
return dcName, nsName, ("dc_namespace_")
} else if statOk && nsOk {
return dcName, nsName, ("dc_namespace")
return dcName, nsName, ("dc_namespace_")
} else if cfgOk {
return dcName, nsName, ("dc")
return dcName, nsName, ("dc_")
}

return dcName, nsName, "" // no-prefix/default i.e. no suffix like "dc" / "dc_namespace"
Expand All @@ -112,7 +112,7 @@ func (xw *XdrWatcher) handleRefresh(o *Observer, infoKeyToProcess string, xdrRaw
continue
}
asMetric, exists := xw.xdrMetrics[stat]
dynamicStatname := metricPrefix + "_" + stat
dynamicStatname := metricPrefix + stat

if !exists {
asMetric = newAerospikeStat(CTX_XDR, dynamicStatname)
Expand Down

0 comments on commit 6a0c7d4

Please sign in to comment.