feat(ibc): migrate sei-ibc-go metrics to OpenTelemetry with dual emission#3543
feat(ibc): migrate sei-ibc-go metrics to OpenTelemetry with dual emission#3543amir-deris wants to merge 5 commits into
Conversation
PR SummaryLow Risk Overview Five new No IBC state machine or bank/transfer logic changes—only instrumentation. Reviewed by Cursor Bugbot for commit bb35645. Bugbot is set up for automated code reviews on this repo. Configure here. |
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3543 +/- ##
==========================================
- Coverage 59.12% 58.29% -0.84%
==========================================
Files 2218 2145 -73
Lines 183132 174524 -8608
==========================================
- Hits 108285 101743 -6542
+ Misses 65082 63730 -1352
+ Partials 9765 9051 -714
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bb35645. Configure here.
| "ibc_transfer_packet_receive", | ||
| metric.WithDescription("Total amount of tokens received in IBC packet"), | ||
| metric.WithUnit("{token}"), | ||
| )), |
There was a problem hiding this comment.
Float gauge loses token precision
Low Severity
IBC transfer amount OTel instruments use Float64Gauge and record float64 values from sdk.Int, while other migrated modules (bank, staking, distribution) use Int64Gauge with exact integer Record calls. Integer token amounts above float64’s exact-integer range can be rounded in Prometheus, so new ibc_transfer_* amount series may not match actual transferred quantities for very large transfers.
Additional Locations (2)
Triggered by learned rule: OTel metrics: guard attribute cardinality and use native types
Reviewed by Cursor Bugbot for commit bb35645. Configure here.


Summary
Adds OpenTelemetry instrumentation to
sei-ibc-goas part of the broader OTel metrics migration (PLT-427/PLT-428). Follows the same dual-emit pattern established in PLT-330 (x/evm) and PLT-353 (sei-cosmos): legacy telemetry calls are preserved alongside new OTel instruments until dashboards are verified and legacy can be removed.Changes
5 new
metrics.gofiles — each initializes an OTel meter and registers instruments:apps/transfer/keeperibc_transfertx_msg_ibc_transfer(gauge),ibc_transfer_packet_receive(gauge),ibc_transfer_send(counter),ibc_transfer_receive(counter)core/keeperibc_coretx_msg_ibc_recv_packet,ibc_timeout_packet,tx_msg_ibc_acknowledge_packet(counters)core/02-client/keeperibc_clientibc_client_create,ibc_client_update,ibc_client_upgrade,ibc_client_misbehaviour(counters)core/03-connection/keeperibc_connectionibc_connection_open_{init,try,ack,confirm}(counters)core/04-channel/keeperibc_channelibc_channel_{open,close}_{init,try,ack,confirm}(counters)11 source files modified — dual-emit added at existing telemetry call sites:
transfer/keeper/relay.go—sendTransfer,OnRecvPacketcore/keeper/msg_server.go—RecvPacket,Timeout,TimeoutOnClose,Acknowledgementcore/02-client/keeper/client.go—CreateClient,UpdateClient,UpgradeClient,CheckMisbehaviourAndUpdateStatecore/02-client/keeper/proposal.go—ClientUpdateProposalcore/03-connection/keeper/handshake.go—ConnOpenInit/Try/Ack/Confirmcore/04-channel/keeper/handshake.go—ChanOpenInit/Try/Ack/Confirm,ChanCloseInit/ConfirmLegacy calls are marked
TODO(PLT-428)for removal once OTel instruments are verified in production dashboards.