[JCC] - Add custom CloudWatch metrics for SSN corrections#1772
Conversation
There may be cases where the state enters an incorrect 'previousSSN' that doesn't match with any license records. We want to have visibility into those cases as well.
|
Warning Review limit reached
Next review available in: 25 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThe PR documents ChangesSSN correction observability
PostCSS dependency updates
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant IngestHandler
participant Metrics
participant CloudWatchAlarm
participant SharedAlarmTopic
IngestHandler->>Metrics: Emit migration outcome counter
Metrics->>CloudWatchAlarm: Provide outcome metric
CloudWatchAlarm->>SharedAlarmTopic: Publish alarm action
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 1 | ❌ 4❌ Failed checks (4 warnings)
✅ Passed checks (1 passed)
✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@backend/compact-connect/lambdas/python/common/cc_common/data_model/data_client.py`:
- Line 3195: Stop logging raw provider-document S3 keys in the moved-document
log near data_client.py lines 3195-3195; replace old_key and new_key with
redacted or irreversible correlation values. In provider_s3_events.py lines
27-31, remove s3_url from the copy-event log and retain only safe event
metadata.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: f1491a67-a62e-43c6-a998-a45922f72948
⛔ Files ignored due to path filters (3)
backend/compact-connect/lambdas/nodejs/yarn.lockis excluded by!**/yarn.lock,!**/*.lockbackend/cosmetology-app/lambdas/nodejs/yarn.lockis excluded by!**/yarn.lock,!**/*.lockbackend/social-work-app/lambdas/nodejs/yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (11)
backend/compact-connect/docs/README.mdbackend/compact-connect/lambdas/nodejs/package.jsonbackend/compact-connect/lambdas/python/common/cc_common/data_model/data_client.pybackend/compact-connect/lambdas/python/provider-data-v1/handlers/ingest.pybackend/compact-connect/lambdas/python/provider-data-v1/handlers/provider_s3_events.pybackend/compact-connect/lambdas/python/provider-data-v1/tests/function/test_handlers/test_ingest.pybackend/compact-connect/lambdas/python/provider-data-v1/tests/function/test_handlers/test_provider_s3_events.pybackend/compact-connect/stacks/ingest_stack.pybackend/compact-connect/tests/app/test_ingest_stack.pybackend/cosmetology-app/lambdas/nodejs/package.jsonbackend/social-work-app/lambdas/nodejs/package.json
|
@jlkravitz This is now ready for your review. Thanks |
jlkravitz
left a comment
There was a problem hiding this comment.
Looks good– Appreciate the doc updates!
@isabeleliassen Good to merge!
Given that we are providing states with the ability to self-correct SSNs for their license records, we need visibility into how many SSN corrections are performed as well as alerts to notify us when a SSN correction occurs. This adds custom metrics/alerts for those specific events.
In addition, during smoke testing it was found that when the military documents were copied over from one bucket to another, it triggers the event processor lambda which failed to process the copy events. This adds a check for that
to ignore the copy events since there is no action that needs to be performed for those events.
Testing List
yarn test:unit:allshould run without errors or warningsyarn serveshould run without errors or warningsyarn buildshould run without errors or warningsbackend/compact-connect/tests/unit/test_api.pyrun compact-connect/bin/download_oas30.pyCloses #1725
Summary by CodeRabbit
Documentation
Bug Fixes
Monitoring