-
Notifications
You must be signed in to change notification settings - Fork 104
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
[OTE-849] Add metrics to track revenue shares #2449
Conversation
Warning Rate limit exceeded@affanv14 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 34 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe changes in this pull request introduce new constants in the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Outside diff range and nitpick comments (1)
protocol/x/subaccounts/keeper/transfer.go (1)
302-302
: Typo in comment: "fee colletor" should be "fee collector"There's a typographical error in the comment. Correcting it improves code readability.
Apply this diff to fix the typo:
- // Emit fee colletor metric + // Emit fee collector metric
163a3e0
to
e59632e
Compare
e59632e
to
e3a56ac
Compare
labels := []metrics.Label{} | ||
var metricName string | ||
switch revShare.RevShareType { | ||
case revsharetypes.REV_SHARE_TYPE_MARKET_MAPPER: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This switching casing code seems redundant, why not just emit a generic rev share variable with the rev share type + recipient as labels?
If you need a separate metrics for market_mapper
, then conditionally add a marketId
label if revShare.RevShareType == revsharetypes.REV_SHARE_TYPE_MARKET_MAPPER
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wanted to keep existing metric as is for marketmapper
Will update the other metrics though!
775974e
to
bcbf113
Compare
bcbf113
to
2832216
Compare
@Mergifyio backport release/protocol/v7.x |
✅ Backports have been created
|
(cherry picked from commit c87960e)
Co-authored-by: Mohammed Affan <[email protected]>
Changelist
Adding metrics to track unconditional and affiliate rev shares
Also added metrics to track remaining fees after revshare is subtracted
Test Plan
[Describe how this PR was tested (if applicable)]
Author/Reviewer Checklist
state-breaking
label.indexer-postgres-breaking
label.PrepareProposal
orProcessProposal
, manually add the labelproposal-breaking
.feature:[feature-name]
.backport/[branch-name]
.refactor
,chore
,bug
.Summary by CodeRabbit
New Features
Bug Fixes