@@ -11,7 +11,7 @@ import (
1111 "github.com/prometheus/client_golang/prometheus"
1212)
1313
14- // ChannelsCollector is a collector that keeps track of channel infromation .
14+ // ChannelsCollector is a collector that keeps track of channel information .
1515type ChannelsCollector struct {
1616 channelBalanceDesc * prometheus.Desc
1717 pendingChannelBalanceDesc * prometheus.Desc
@@ -279,7 +279,7 @@ func (c *ChannelsCollector) Collect(ch chan<- prometheus.Metric) {
279279 initiator := initiatorLabel (channel )
280280 peer := channel .PubKeyBytes .String ()
281281
282- chanIdStr := strconv .Itoa (int (channel .ChannelID ))
282+ chanIDStr := strconv .Itoa (int (channel .ChannelID ))
283283
284284 primaryChannel := c .primaryNode != nil &&
285285 channel .PubKeyBytes == * c .primaryNode
@@ -292,57 +292,57 @@ func (c *ChannelsCollector) Collect(ch chan<- prometheus.Metric) {
292292
293293 ch <- prometheus .MustNewConstMetric (
294294 c .incomingChanSatDesc , prometheus .GaugeValue ,
295- float64 (channel .RemoteBalance ), chanIdStr , status ,
295+ float64 (channel .RemoteBalance ), chanIDStr , status ,
296296 initiator , peer ,
297297 )
298298 ch <- prometheus .MustNewConstMetric (
299299 c .outgoingChanSatDesc , prometheus .GaugeValue ,
300- float64 (channel .LocalBalance ), chanIdStr , status ,
300+ float64 (channel .LocalBalance ), chanIDStr , status ,
301301 initiator , peer ,
302302 )
303303 ch <- prometheus .MustNewConstMetric (
304304 c .numPendingHTLCsDesc , prometheus .GaugeValue ,
305- float64 (channel .NumPendingHtlcs ), chanIdStr , status ,
305+ float64 (channel .NumPendingHtlcs ), chanIDStr , status ,
306306 initiator , peer ,
307307 )
308308 ch <- prometheus .MustNewConstMetric (
309309 c .satsSentDesc , prometheus .GaugeValue ,
310- float64 (channel .TotalSent ), chanIdStr , status ,
310+ float64 (channel .TotalSent ), chanIDStr , status ,
311311 initiator , peer ,
312312 )
313313 ch <- prometheus .MustNewConstMetric (
314314 c .satsRecvDesc , prometheus .GaugeValue ,
315- float64 (channel .TotalReceived ), chanIdStr , status ,
315+ float64 (channel .TotalReceived ), chanIDStr , status ,
316316 initiator , peer ,
317317 )
318318 ch <- prometheus .MustNewConstMetric (
319319 c .numUpdatesDesc , prometheus .GaugeValue ,
320- float64 (channel .NumUpdates ), chanIdStr , status ,
320+ float64 (channel .NumUpdates ), chanIDStr , status ,
321321 initiator , peer ,
322322 )
323323 ch <- prometheus .MustNewConstMetric (
324324 c .csvDelayDesc , prometheus .GaugeValue ,
325- float64 (channel .LocalConstraints .CsvDelay ), chanIdStr ,
325+ float64 (channel .LocalConstraints .CsvDelay ), chanIDStr ,
326326 status , initiator , peer ,
327327 )
328328 ch <- prometheus .MustNewConstMetric (
329329 c .unsettledBalanceDesc , prometheus .GaugeValue ,
330- float64 (channel .UnsettledBalance ), chanIdStr , status ,
330+ float64 (channel .UnsettledBalance ), chanIDStr , status ,
331331 initiator , peer ,
332332 )
333333 ch <- prometheus .MustNewConstMetric (
334334 c .feePerKwDesc , prometheus .GaugeValue ,
335- float64 (channel .FeePerKw ), chanIdStr , status , initiator ,
335+ float64 (channel .FeePerKw ), chanIDStr , status , initiator ,
336336 peer ,
337337 )
338338 ch <- prometheus .MustNewConstMetric (
339339 c .commitWeightDesc , prometheus .GaugeValue ,
340- float64 (channel .CommitWeight ), chanIdStr , status ,
340+ float64 (channel .CommitWeight ), chanIDStr , status ,
341341 initiator , peer ,
342342 )
343343 ch <- prometheus .MustNewConstMetric (
344344 c .commitFeeDesc , prometheus .GaugeValue ,
345- float64 (channel .CommitFee ), chanIdStr , status ,
345+ float64 (channel .CommitFee ), chanIDStr , status ,
346346 initiator , peer ,
347347 )
348348
@@ -351,7 +351,7 @@ func (c *ChannelsCollector) Collect(ch chan<- prometheus.Metric) {
351351 ch <- prometheus .MustNewConstMetric (
352352 c .channelUptimeDesc , prometheus .GaugeValue ,
353353 float64 (channel .Uptime )/ float64 (channel .LifeTime ),
354- chanIdStr , status , initiator , peer ,
354+ chanIDStr , status , initiator , peer ,
355355 )
356356 }
357357 }
0 commit comments