Publish submission counts metrics to CloudWatch#2147
Conversation
| private | ||
|
|
||
| def submission_counts_by_form_id | ||
| Submission.where(mode: "form").group(:form_id).count |
There was a problem hiding this comment.
Currently I think the submission counts collected by Anne exclude submissions to test forms by our end to end tests and smoke tests. Ought we do the same here?
There was a problem hiding this comment.
That's okay - submissions are grouped by form id, so we can filter them out after.
There was a problem hiding this comment.
The end-to-end tests create a form, submit it and then delete it. I don't know if we'll easily have the form ids to exclude and including known form ids would be tricky too, i think?
There was a problem hiding this comment.
Mmm I agree with what Tom says, it feels like it will be easier to filter out before sending to CloudWatch, we can use the same criteria Anne uses currently in Splunk:
form_name!=capybara* form_name!=*smoke* form_name!=s3*
Publish SubmissionCount metrics grouped by form for KPI reporting.
Add metrics:export_submission_counts for scheduled KPI publishing.
Replace the periodic database aggregation rake task with an incrementing counter at submission creation time, and export metrics via PeriodicMetricReader.
82471a3 to
70c1c91
Compare
|
🎉 A review copy of this PR has been deployed! You can reach it at: https://pr-2147.submit.review.forms.service.gov.uk/ It may take 5 minutes or so for the application to be fully deployed and working. If it still isn't ready For the sign in details and more information, see the review apps wiki page. |
What problem does this pull request solve?
Trello card: https://trello.com/c/b3cNvzu5/3136-record-kpis-in-cloudwatch
This adds automated submission count metrics to CloudWatch so we can track platform usage over time without manual reporting.