Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Observed Packet Metric #1345

Merged
merged 9 commits into from
Dec 14, 2023
Merged

fix: Observed Packet Metric #1345

merged 9 commits into from
Dec 14, 2023

Conversation

boojamya
Copy link
Contributor

@boojamya boojamya commented Nov 23, 2023

The main goal of this PR was to fix the ShouldRelayChannel method in the case where there was no path filter rule in the relayer config.

We discovered an issue when tracking cosmos_relayer_observed_packets metric. When no filter was applied to a path, we were observing packets that were irrelevant to the path(s) the relayer was configured for.

To fix this we now check if the channelKey is in the channelStateCache in the pathEndRunTime

  • this is the reason to move ShouldRelayChannel from path_end to path_end_runtime

The unit tests were refactored.

Closes #1341

@boojamya boojamya marked this pull request as ready for review December 5, 2023 19:49
@boojamya boojamya added the T: Metrics TYPE: Metrics label Dec 5, 2023
Copy link
Member

@jtieri jtieri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

had one nit but otherwise i think this looks sufficient, tests look accurate and the intended patch seems to make sense to me.

gonna approve this now so it's not blocked on me

relayer/processor/path_end_runtime.go Show resolved Hide resolved
@boojamya boojamya merged commit cfe8b93 into main Dec 14, 2023
19 checks passed
@boojamya boojamya deleted the dan/fix-observed-tx branch December 14, 2023 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: Metrics TYPE: Metrics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update cosmos_relayer_observed_packets metric to only observe packets that apply to filter rules
2 participants