update micro
Some checks failed
codeql / analyze (go) (push) Failing after 50s
build / test (push) Failing after 4m53s
build / lint (push) Successful in 9m28s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-11-08 17:38:39 +03:00
parent c187502cd4
commit a239f86139
4 changed files with 18 additions and 59 deletions

View File

@@ -30,10 +30,6 @@ func (r *victoriametricsMeter) Clone(opts ...meter.Option) meter.Meter {
}
func (r *victoriametricsMeter) buildName(name string, labels ...string) string {
if len(r.opts.MetricPrefix) > 0 {
name = r.opts.MetricPrefix + name
}
nl := len(r.opts.Labels) + len(labels)
if nl == 0 {
return name
@@ -43,14 +39,6 @@ func (r *victoriametricsMeter) buildName(name string, labels ...string) string {
nlabels = append(nlabels, r.opts.Labels...)
nlabels = append(nlabels, labels...)
if len(r.opts.LabelPrefix) == 0 {
return meter.BuildName(name, nlabels...)
}
for idx := 0; idx < nl; idx++ {
nlabels[idx] = r.opts.LabelPrefix + nlabels[idx]
idx++
}
return meter.BuildName(name, nlabels...)
}