diff --git a/tools/collector-generator/collector.template b/tools/collector-generator/collector.template index 206fbf83..41aec6ae 100644 --- a/tools/collector-generator/collector.template +++ b/tools/collector-generator/collector.template @@ -29,7 +29,7 @@ func New{{ .CollectorName }}Collector() (Collector, error) { } // Collect sends the metric values for each metric // to the provided prometheus Metric channel. -func (c *{{ .CollectorName }}Collector) Collect(ch chan<- prometheus.Metric) error { +func (c *{{ .CollectorName }}Collector) Collect(ctx *ScrapeContext, ch chan<- prometheus.Metric) error { if desc, err := c.collect(ch); err != nil { log.Error("failed collecting {{ .CollectorName | toLower }} metrics:", desc, err) return err