@@ -306,8 +306,8 @@ func InitCensus(nodeType NodeType, version string) {
306
306
census .mTicketValueSent = stats .Float64 ("ticket_value_sent" , "TicketValueSent" , "gwei" )
307
307
census .mTicketsSent = stats .Int64 ("tickets_sent" , "TicketsSent" , "tot" )
308
308
census .mPaymentCreateError = stats .Int64 ("payment_create_errors" , "PaymentCreateError" , "tot" )
309
- census .mDeposit = stats .Float64 ("broadcaster_deposit " , "Current remaining deposit for the broadcaster node" , "gwei" )
310
- census .mReserve = stats .Float64 ("broadcaster_reserve " , "Current remaining reserve for the broadcaster node" , "gwei" )
309
+ census .mDeposit = stats .Float64 ("gateway_deposit " , "Current remaining deposit for the gateway node" , "gwei" )
310
+ census .mReserve = stats .Float64 ("gateway_reserve " , "Current remaining reserve for the gateway node" , "gwei" )
311
311
312
312
// Metrics for receiving payments
313
313
census .mTicketValueRecv = stats .Float64 ("ticket_value_recv" , "TicketValueRecv" , "gwei" )
@@ -690,17 +690,32 @@ func InitCensus(nodeType NodeType, version string) {
690
690
TagKeys : baseTagsWithManifestID ,
691
691
Aggregation : view .Sum (),
692
692
},
693
+ {
694
+ Name : "gateway_deposit" ,
695
+ Measure : census .mDeposit ,
696
+ Description : "Current remaining deposit for the gateway node" ,
697
+ TagKeys : baseTagsWithEthAddr ,
698
+ Aggregation : view .LastValue (),
699
+ },
700
+ {
701
+ Name : "gateway_reserve" ,
702
+ Measure : census .mReserve ,
703
+ Description : "Current remaining reserve for the gateway node" ,
704
+ TagKeys : baseTagsWithEthAddr ,
705
+ Aggregation : view .LastValue (),
706
+ },
707
+ // TODO: Keep the old names for backwards compatibility, remove in the future
693
708
{
694
709
Name : "broadcaster_deposit" ,
695
710
Measure : census .mDeposit ,
696
- Description : "Current remaining deposit for the broadcaster node" ,
711
+ Description : "Current remaining deposit for the gateway node" ,
697
712
TagKeys : baseTagsWithEthAddr ,
698
713
Aggregation : view .LastValue (),
699
714
},
700
715
{
701
716
Name : "broadcaster_reserve" ,
702
717
Measure : census .mReserve ,
703
- Description : "Current remaining reserve for the broadcaster node" ,
718
+ Description : "Current remaining reserve for the gateway node" ,
704
719
TagKeys : baseTagsWithEthAddr ,
705
720
Aggregation : view .LastValue (),
706
721
},
@@ -1533,7 +1548,7 @@ func PaymentCreateError(ctx context.Context) {
1533
1548
}
1534
1549
}
1535
1550
1536
- // Deposit records the current deposit for the broadcaster
1551
+ // Deposit records the current deposit for the gateway
1537
1552
func Deposit (sender string , deposit * big.Int ) {
1538
1553
if err := stats .RecordWithTags (census .ctx ,
1539
1554
[]tag.Mutator {tag .Insert (census .kSender , sender )}, census .mDeposit .M (wei2gwei (deposit ))); err != nil {
0 commit comments