@@ -86,28 +86,28 @@ func (c *edacCollector) Update(ch chan<- prometheus.Metric) error {
8686
8787 value , err := readUintFromFile (filepath .Join (controller , "ce_count" ))
8888 if err != nil {
89- return fmt .Errorf ("couldn't get ce_count for controller %s: %s " , controllerNumber , err )
89+ return fmt .Errorf ("couldn't get ce_count for controller %s: %w " , controllerNumber , err )
9090 }
9191 ch <- prometheus .MustNewConstMetric (
9292 c .ceCount , prometheus .CounterValue , float64 (value ), controllerNumber )
9393
9494 value , err = readUintFromFile (filepath .Join (controller , "ce_noinfo_count" ))
9595 if err != nil {
96- return fmt .Errorf ("couldn't get ce_noinfo_count for controller %s: %s " , controllerNumber , err )
96+ return fmt .Errorf ("couldn't get ce_noinfo_count for controller %s: %w " , controllerNumber , err )
9797 }
9898 ch <- prometheus .MustNewConstMetric (
9999 c .csRowCECount , prometheus .CounterValue , float64 (value ), controllerNumber , "unknown" )
100100
101101 value , err = readUintFromFile (filepath .Join (controller , "ue_count" ))
102102 if err != nil {
103- return fmt .Errorf ("couldn't get ue_count for controller %s: %s " , controllerNumber , err )
103+ return fmt .Errorf ("couldn't get ue_count for controller %s: %w " , controllerNumber , err )
104104 }
105105 ch <- prometheus .MustNewConstMetric (
106106 c .ueCount , prometheus .CounterValue , float64 (value ), controllerNumber )
107107
108108 value , err = readUintFromFile (filepath .Join (controller , "ue_noinfo_count" ))
109109 if err != nil {
110- return fmt .Errorf ("couldn't get ue_noinfo_count for controller %s: %s " , controllerNumber , err )
110+ return fmt .Errorf ("couldn't get ue_noinfo_count for controller %s: %w " , controllerNumber , err )
111111 }
112112 ch <- prometheus .MustNewConstMetric (
113113 c .csRowUECount , prometheus .CounterValue , float64 (value ), controllerNumber , "unknown" )
@@ -126,14 +126,14 @@ func (c *edacCollector) Update(ch chan<- prometheus.Metric) error {
126126
127127 value , err = readUintFromFile (filepath .Join (csrow , "ce_count" ))
128128 if err != nil {
129- return fmt .Errorf ("couldn't get ce_count for controller/csrow %s/%s: %s " , controllerNumber , csrowNumber , err )
129+ return fmt .Errorf ("couldn't get ce_count for controller/csrow %s/%s: %w " , controllerNumber , csrowNumber , err )
130130 }
131131 ch <- prometheus .MustNewConstMetric (
132132 c .csRowCECount , prometheus .CounterValue , float64 (value ), controllerNumber , csrowNumber )
133133
134134 value , err = readUintFromFile (filepath .Join (csrow , "ue_count" ))
135135 if err != nil {
136- return fmt .Errorf ("couldn't get ue_count for controller/csrow %s/%s: %s " , controllerNumber , csrowNumber , err )
136+ return fmt .Errorf ("couldn't get ue_count for controller/csrow %s/%s: %w " , controllerNumber , csrowNumber , err )
137137 }
138138 ch <- prometheus .MustNewConstMetric (
139139 c .csRowUECount , prometheus .CounterValue , float64 (value ), controllerNumber , csrowNumber )
0 commit comments