📈 server: improve panda failure telemetry#794
Conversation
🦋 Changeset detectedLatest commit: 8ade540 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughRename and replace the revert-fingerprint utility with Changes
Sequence Diagram(s)sequenceDiagram
actor Client
participant Hook as Panda/Block Hook
participant Keeper as Keeper/Contract
participant Segment as Analytics
participant Sentry as Sentry
Client->>Hook: initiate collection/settlement
Hook->>Keeper: call contract (e.g., exaSend / collect)
Keeper-->>Hook: returns or throws
alt error (revert/failure)
Hook->>Hook: reason = revertReason(error, {...})
Hook->>Hook: fingerprint = revertFingerprint(error)
Hook->>Segment: track("TransactionRejected", { ..., reason, reasonName })
Hook->>Segment: track("PandaCollectionFailed", { ..., reason, reasonName, settlement })
Hook->>Sentry: captureException(error, { fingerprint, tags, pandaCollection })
Hook-->>Client: return error (may suspend user if settlement=true)
else success
Hook->>Segment: track success events
Hook-->>Client: return success response
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @cruzdanilo, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly improves the server's telemetry for Panda settlement failures. By refactoring error handling utilities and introducing detailed Segment tracking events, the system can now capture more granular information about why transactions are rejected or collections fail. This enhancement provides better visibility into issues, aiding in debugging and understanding user experience related to card operations. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
Sentry Issue: SERVER-HK |
|
Sentry Issue: SERVER-HF |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #794 +/- ##
==========================================
+ Coverage 68.88% 69.50% +0.62%
==========================================
Files 207 208 +1
Lines 7048 7274 +226
Branches 2232 2332 +100
==========================================
+ Hits 4855 5056 +201
- Misses 2010 2025 +15
- Partials 183 193 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7799343217
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Chores