chore: Emit metric on 'onAppAddedToConversation' event WPB-21843#47
Conversation
PR Review: Add metric on 'onAppAddedToConversation' eventSummaryThis PR adds a custom metric to track when the Poll App is added to a conversation. The implementation is straightforward and follows existing patterns in the codebase. Code Quality ✅
Potential Issues
|
spoonman01
left a comment
There was a problem hiding this comment.
Good, don't know if Claude suggestion to add a test makes sense or not, leave it to you
|
@spoonman01 Claude is right, I should add at least a happy path test here. Now added. Thanks for noting. |
PR Review: Add metric for app added to conversationSummaryThis PR adds a custom metric ✅ Code Quality & Best PracticesStrengths:
Code Style:
🔍 Potential IssuesNone identified - The implementation is straightforward and correct. ⚡ Performance ConsiderationsNo concerns:
🔒 Security ConcernsNo security issues identified:
🧪 Test CoverageGood test coverage:
Suggestion for future consideration: 📝 Minor Observations
✨ Final VerdictLGTM! 🚀 This is a clean, well-tested addition that follows the established patterns in the codebase. The implementation is production-ready and aligns with the stated goal of tracking app adoption metrics. Recommendations:
Great work on including the test and following the existing code patterns! |
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764The PR Description
What's new in this PR?
Issues
We need a custom metric to track the number of times the app is added into a conversation.
Solutions
Add the custom metric and trigger on 'onAppAddedToConversation' event received.
Testing
How to Test
Run the app. Add the Poll App user to a channel. Check the metrics via http://localhost:8080/metrics and verify that
pollapp_added_to_conversation_totalis visible with a count. (See sample vieq below)