@@ -469,18 +469,16 @@ func (k Keeper) RecvPacket(goCtx context.Context, msg *channeltypes.MsgRecvPacke
469
469
}
470
470
}
471
471
472
- defer func () {
473
- telemetry .IncrCounterWithLabels (
474
- []string {"tx" , "msg" , "ibc" , channeltypes .EventTypeRecvPacket },
475
- 1 ,
476
- []metrics.Label {
477
- telemetry .NewLabel (coretypes .LabelSourcePort , msg .Packet .SourcePort ),
478
- telemetry .NewLabel (coretypes .LabelSourceChannel , msg .Packet .SourceChannel ),
479
- telemetry .NewLabel (coretypes .LabelDestinationPort , msg .Packet .DestinationPort ),
480
- telemetry .NewLabel (coretypes .LabelDestinationChannel , msg .Packet .DestinationChannel ),
481
- },
482
- )
483
- }()
472
+ defer telemetry .IncrCounterWithLabels (
473
+ []string {"tx" , "msg" , "ibc" , channeltypes .EventTypeRecvPacket },
474
+ 1 ,
475
+ []metrics.Label {
476
+ telemetry .NewLabel (coretypes .LabelSourcePort , msg .Packet .SourcePort ),
477
+ telemetry .NewLabel (coretypes .LabelSourceChannel , msg .Packet .SourceChannel ),
478
+ telemetry .NewLabel (coretypes .LabelDestinationPort , msg .Packet .DestinationPort ),
479
+ telemetry .NewLabel (coretypes .LabelDestinationChannel , msg .Packet .DestinationChannel ),
480
+ },
481
+ )
484
482
485
483
ctx .Logger ().Info ("receive packet callback succeeded" , "port-id" , msg .Packet .SourcePort , "channel-id" , msg .Packet .SourceChannel , "result" , channeltypes .SUCCESS .String ())
486
484
@@ -541,19 +539,17 @@ func (k Keeper) Timeout(goCtx context.Context, msg *channeltypes.MsgTimeout) (*c
541
539
return nil , err
542
540
}
543
541
544
- defer func () {
545
- telemetry .IncrCounterWithLabels (
546
- []string {"ibc" , "timeout" , "packet" },
547
- 1 ,
548
- []metrics.Label {
549
- telemetry .NewLabel (coretypes .LabelSourcePort , msg .Packet .SourcePort ),
550
- telemetry .NewLabel (coretypes .LabelSourceChannel , msg .Packet .SourceChannel ),
551
- telemetry .NewLabel (coretypes .LabelDestinationPort , msg .Packet .DestinationPort ),
552
- telemetry .NewLabel (coretypes .LabelDestinationChannel , msg .Packet .DestinationChannel ),
553
- telemetry .NewLabel (coretypes .LabelTimeoutType , "height" ),
554
- },
555
- )
556
- }()
542
+ defer telemetry .IncrCounterWithLabels (
543
+ []string {"ibc" , "timeout" , "packet" },
544
+ 1 ,
545
+ []metrics.Label {
546
+ telemetry .NewLabel (coretypes .LabelSourcePort , msg .Packet .SourcePort ),
547
+ telemetry .NewLabel (coretypes .LabelSourceChannel , msg .Packet .SourceChannel ),
548
+ telemetry .NewLabel (coretypes .LabelDestinationPort , msg .Packet .DestinationPort ),
549
+ telemetry .NewLabel (coretypes .LabelDestinationChannel , msg .Packet .DestinationChannel ),
550
+ telemetry .NewLabel (coretypes .LabelTimeoutType , "height" ),
551
+ },
552
+ )
557
553
558
554
ctx .Logger ().Info ("timeout packet callback succeeded" , "port-id" , msg .Packet .SourcePort , "channel-id" , msg .Packet .SourceChannel , "result" , channeltypes .SUCCESS .String ())
559
555
@@ -617,19 +613,17 @@ func (k Keeper) TimeoutOnClose(goCtx context.Context, msg *channeltypes.MsgTimeo
617
613
return nil , err
618
614
}
619
615
620
- defer func () {
621
- telemetry .IncrCounterWithLabels (
622
- []string {"ibc" , "timeout" , "packet" },
623
- 1 ,
624
- []metrics.Label {
625
- telemetry .NewLabel (coretypes .LabelSourcePort , msg .Packet .SourcePort ),
626
- telemetry .NewLabel (coretypes .LabelSourceChannel , msg .Packet .SourceChannel ),
627
- telemetry .NewLabel (coretypes .LabelDestinationPort , msg .Packet .DestinationPort ),
628
- telemetry .NewLabel (coretypes .LabelDestinationChannel , msg .Packet .DestinationChannel ),
629
- telemetry .NewLabel (coretypes .LabelTimeoutType , "channel-closed" ),
630
- },
631
- )
632
- }()
616
+ defer telemetry .IncrCounterWithLabels (
617
+ []string {"ibc" , "timeout" , "packet" },
618
+ 1 ,
619
+ []metrics.Label {
620
+ telemetry .NewLabel (coretypes .LabelSourcePort , msg .Packet .SourcePort ),
621
+ telemetry .NewLabel (coretypes .LabelSourceChannel , msg .Packet .SourceChannel ),
622
+ telemetry .NewLabel (coretypes .LabelDestinationPort , msg .Packet .DestinationPort ),
623
+ telemetry .NewLabel (coretypes .LabelDestinationChannel , msg .Packet .DestinationChannel ),
624
+ telemetry .NewLabel (coretypes .LabelTimeoutType , "channel-closed" ),
625
+ },
626
+ )
633
627
634
628
ctx .Logger ().Info ("timeout on close callback succeeded" , "port-id" , msg .Packet .SourcePort , "channel-id" , msg .Packet .SourceChannel , "result" , channeltypes .SUCCESS .String ())
635
629
@@ -685,18 +679,16 @@ func (k Keeper) Acknowledgement(goCtx context.Context, msg *channeltypes.MsgAckn
685
679
return nil , errorsmod .Wrap (err , "acknowledge packet callback failed" )
686
680
}
687
681
688
- defer func () {
689
- telemetry .IncrCounterWithLabels (
690
- []string {"tx" , "msg" , "ibc" , channeltypes .EventTypeAcknowledgePacket },
691
- 1 ,
692
- []metrics.Label {
693
- telemetry .NewLabel (coretypes .LabelSourcePort , msg .Packet .SourcePort ),
694
- telemetry .NewLabel (coretypes .LabelSourceChannel , msg .Packet .SourceChannel ),
695
- telemetry .NewLabel (coretypes .LabelDestinationPort , msg .Packet .DestinationPort ),
696
- telemetry .NewLabel (coretypes .LabelDestinationChannel , msg .Packet .DestinationChannel ),
697
- },
698
- )
699
- }()
682
+ defer telemetry .IncrCounterWithLabels (
683
+ []string {"tx" , "msg" , "ibc" , channeltypes .EventTypeAcknowledgePacket },
684
+ 1 ,
685
+ []metrics.Label {
686
+ telemetry .NewLabel (coretypes .LabelSourcePort , msg .Packet .SourcePort ),
687
+ telemetry .NewLabel (coretypes .LabelSourceChannel , msg .Packet .SourceChannel ),
688
+ telemetry .NewLabel (coretypes .LabelDestinationPort , msg .Packet .DestinationPort ),
689
+ telemetry .NewLabel (coretypes .LabelDestinationChannel , msg .Packet .DestinationChannel ),
690
+ },
691
+ )
700
692
701
693
ctx .Logger ().Info ("acknowledgement succeeded" , "port-id" , msg .Packet .SourcePort , "channel-id" , msg .Packet .SourceChannel , "result" , channeltypes .SUCCESS .String ())
702
694
0 commit comments