-
Notifications
You must be signed in to change notification settings - Fork 115
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
add telemetry and logs for liquidation daemon #2122
Conversation
WalkthroughThe recent updates enhance error handling and telemetry reporting across several components in the codebase. Improvements include wrapping errors with contextual information to aid debugging and introducing metrics to monitor the number of requests processed. These changes contribute to a more robust and observable system, fostering better maintenance and performance tracking. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant LiquidationService
participant Telemetry
Client->>LiquidationService: SendLiquidatableSubaccountIds()
LiquidationService-->>Client: Process Request
Note over Client: Record telemetry metric for requests
LiquidationService-->>Client: Return result with potential error
alt Error occurred
Client->>Client: Wrap error with context
end
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 as PR comments)
Additionally, you can add 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: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- protocol/daemons/liquidation/client/grpc_helper.go (2 hunks)
- protocol/daemons/liquidation/client/sub_task_runner.go (2 hunks)
- protocol/lib/metrics/constants.go (1 hunks)
Additional comments not posted (7)
protocol/daemons/liquidation/client/sub_task_runner.go (4)
123-127
: Enhanced error context for subaccount fetching.The error handling now provides more context, which is beneficial for debugging.
133-137
: Enhanced error context for market price fetching.The error handling now provides more context, which is beneficial for debugging.
146-150
: Enhanced error context for perpetual fetching.The error handling now provides more context, which is beneficial for debugging.
156-160
: Enhanced error context for liquidity tier fetching.The error handling now provides more context, which is beneficial for debugging.
protocol/daemons/liquidation/client/grpc_helper.go (2)
275-280
: Telemetry metric added for request count.The addition of a telemetry metric for the number of requests aids in monitoring system performance.
284-288
: Enhanced error context for LiquidateSubaccounts call.The error handling now provides more context, which is beneficial for debugging.
protocol/lib/metrics/constants.go (1)
317-317
: New constantNumRequests
added for tracking requests.This addition enhances the codebase by allowing for more granular control over request-related metrics.
@Mergifyio backport release/protocol/v5.2.x |
✅ Backports have been created
|
(cherry picked from commit 5030459)
Co-authored-by: jayy04 <[email protected]>
@Mergifyio backport release/protocol/v6.x |
✅ Backports have been created
|
(cherry picked from commit 5030459) # Conflicts: # protocol/daemons/liquidation/client/grpc_helper.go
(cherry picked from commit 5030459)
Co-authored-by: Jay Yu <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: jayy04 <[email protected]>
Changelist
[Describe or list the changes made in this PR]
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
Chores