We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ffe5f8 commit 1413216Copy full SHA for 1413216
pkg/util/metrics/metrics.go
@@ -45,8 +45,12 @@ func ProcessMetricsScraperConfig(scraperConfig ScraperConfig) Scraper {
45
}
46
// Combine users provided metadata with metrics and summary metadata
47
for k, v := range userMetadata {
48
- scraperConfig.SummaryMetadata[k] = v
49
- scraperConfig.MetricsMetadata[k] = v
+ if scraperConfig.SummaryMetadata != nil {
+ scraperConfig.SummaryMetadata[k] = v
50
+ }
51
+ if scraperConfig.MetricsMetadata != nil {
52
+ scraperConfig.MetricsMetadata[k] = v
53
54
55
// MetricsEndpoint has preference over the configuration file
56
if scraperConfig.MetricsEndpoint != "" {
0 commit comments