Apply suggestions from code review

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: George Krajcsovits <krajorama@users.noreply.github.com>
This commit is contained in:
George Krajcsovits 2024-10-14 11:13:58 +02:00 committed by GitHub
parent 0a40a09da5
commit a1700aab3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions
config
model/textparse

View file

@ -635,7 +635,7 @@ type ScrapeConfig struct {
ScrapeProtocols []ScrapeProtocol `yaml:"scrape_protocols,omitempty"` ScrapeProtocols []ScrapeProtocol `yaml:"scrape_protocols,omitempty"`
// Whether to scrape a classic histogram that is also exposed as a native histogram. // Whether to scrape a classic histogram that is also exposed as a native histogram.
ScrapeClassicHistograms bool `yaml:"scrape_classic_histograms,omitempty"` ScrapeClassicHistograms bool `yaml:"scrape_classic_histograms,omitempty"`
// Whether to convert a scraped classic histogram into a native histogram with custom buckets. // Whether to convert all scraped classic histograms into a native histogram with custom buckets.
ConvertClassicHistograms bool `yaml:"convert_classic_histograms,omitempty"` ConvertClassicHistograms bool `yaml:"convert_classic_histograms,omitempty"`
// File to which scrape failures are logged. // File to which scrape failures are logged.
ScrapeFailureLogFile string `yaml:"scrape_failure_log_file,omitempty"` ScrapeFailureLogFile string `yaml:"scrape_failure_log_file,omitempty"`

View file

@ -40,7 +40,7 @@ var newTestParserFns = map[string]newParser{
"omtext": func(b []byte, st *labels.SymbolTable) Parser { "omtext": func(b []byte, st *labels.SymbolTable) Parser {
return NewOpenMetricsParser(b, st, WithOMParserCTSeriesSkipped()) return NewOpenMetricsParser(b, st, WithOMParserCTSeriesSkipped())
}, },
"nhcb_over_omtext": func(b []byte, st *labels.SymbolTable) Parser { "omtext_with_nhcb": func(b []byte, st *labels.SymbolTable) Parser {
p := NewOpenMetricsParser(b, st, WithOMParserCTSeriesSkipped()) p := NewOpenMetricsParser(b, st, WithOMParserCTSeriesSkipped())
return NewNHCBParser(p, st, false) return NewNHCBParser(p, st, false)
}, },