diff --git a/collectors/apache.go b/collectors/apache.go index 121cea4..a2f009f 100644 --- a/collectors/apache.go +++ b/collectors/apache.go @@ -199,7 +199,6 @@ func getApacheMetrics(apacheStatus string, fqdn string, ctx context.Context, log } func NewApacheCollector(logger *slog.Logger) *ApacheCollector { - logger.LogAttrs(context.Background(), slog.LevelInfo, "apache collector", slog.String("collector", "apache")) return &ApacheCollector{ logger: logger, WebsocketConnections: prometheus.NewDesc(prometheus.BuildFQName(namespace, "", "websocket_connections"), "Number of websocket connections", nil, nil), diff --git a/collectors/collector.go b/collectors/collector.go index a5ee86e..6ee357d 100644 --- a/collectors/collector.go +++ b/collectors/collector.go @@ -152,7 +152,7 @@ func (c *Collector) collect(ch chan<- prometheus.Metric) error { wg.Add(3) go func(puns []string) { - p := NewProcessCollector(c.logger) + p := NewProcessCollector(c.logger.With("collector", "process")) err := p.collect(puns, ch) if err != nil { c.logger.Error("Error collecting process information", "err", err) diff --git a/collectors/passenger.go b/collectors/passenger.go index 9581fcc..f12c54c 100644 --- a/collectors/passenger.go +++ b/collectors/passenger.go @@ -84,7 +84,6 @@ type PassengerProcessMetrics struct { } func NewPassengerCollector(logger *slog.Logger) *PassengerCollector { - logger.LogAttrs(context.Background(), slog.LevelInfo, "Passenger collector", slog.String("collector", "passenger")) return &PassengerCollector{ logger: logger, Instances: prometheus.NewDesc(prometheus.BuildFQName(namespace, "passenger", "instances"), "Number of Passenger instances", nil, nil), diff --git a/collectors/process.go b/collectors/process.go index f07f4c9..613c69e 100644 --- a/collectors/process.go +++ b/collectors/process.go @@ -23,7 +23,6 @@ package collectors import ( - "context" "log/slog" "slices" "strconv" @@ -118,7 +117,6 @@ func getProcessMetrics(puns []string, logger *slog.Logger) (ProcessMetrics, erro } func NewProcessCollector(logger *slog.Logger) *ProcessCollector { - logger.LogAttrs(context.Background(), slog.LevelInfo, "process collector", slog.String("collector", "process")) return &ProcessCollector{ logger: logger, RackApps: prometheus.NewDesc(prometheus.BuildFQName(namespace, "", "rack_apps"), "Number of running Rack apps", nil, nil),