From 787bb74076c784243d6c429e0221010a53897b9c Mon Sep 17 00:00:00 2001 From: Owen Williams Date: Thu, 18 Jan 2024 11:35:50 -0500 Subject: [PATCH] updates --- scrape/manager.go | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/scrape/manager.go b/scrape/manager.go index 613a59c93..31efb35bd 100644 --- a/scrape/manager.go +++ b/scrape/manager.go @@ -161,17 +161,24 @@ func (m *Manager) reloader() { func (m *Manager) reload() { m.mtxScrape.Lock() defer m.mtxScrape.Unlock() - var err error - if m.opts.NameEscapingScheme != "" { - model.NameEscapingScheme, err = model.ToEscapingScheme(m.opts.NameEscapingScheme) - if err != nil { - level.Error(m.logger).Log("msg", "error setting escaping scheme", "err", err) - return - } - } else { - model.NameEscapingScheme = DefaultNameEscapingScheme - } - level.Info(m.logger).Log("msg", "ESCAPING SCHEME", "scheme", model.NameEscapingScheme.String(), "arg", m.opts.NameEscapingScheme) + // var err error + // if m.opts.UTF8Names { + // model.NameValidationScheme = model.UTF8Validation + // } else { + // model.NameValidationScheme = model.LegacyValidation + // } + // level.Info(m.logger).Log("msg", "validation scheme", "scheme", model.NameValidationScheme, "arg", m.opts.UTF8Names) + // XXXXX the problem with this is that agent does not really use scrape.Options. Also too, this is like per-scrape not per-instance, so it's not really the right place for this at all. + // if m.opts.NameEscapingScheme != "" { + // model.NameEscapingScheme, err = model.ToEscapingScheme(m.opts.NameEscapingScheme) + // if err != nil { + // level.Error(m.logger).Log("msg", "error setting escaping scheme", "err", err) + // return + // } + // } else { + // model.NameEscapingScheme = DefaultNameEscapingScheme + // } + level.Info(m.logger).Log("msg", "ESCAPING SCHEME", "scheme", model.NameEscapingScheme.String()) var wg sync.WaitGroup for setName, groups := range m.targetSets {