Resolve "Usage Ping for creating issues from Sentry errors"
What does this MR do?
Overview
This adds the the usage ping a Count of the number of issues created from the Sentry error detail page in GitLab.
This work resolves this issue: #36190 (closed)
Technical Details
The SentryIssue
model is a place to store the link between a sentry issue and a issue and any other details about that relationship. When an issue is created from the error tacking page we will create a new sentry_issue method. See these MR's !20629 (merged), !20799 (merged), !20885 (merged).
For now we can just count the total rows in the SentryIssue
table.
Eventually, if we store issues that are created via the gitlab ui and issues that are created via the Sentry UI in this same table we will need a way to distinguish between those that are created in Sentry versus gitlab but for now just counting all the rows works and we can cross that bridge once the work is done to store the link between a sentry issue and a gitlab issue for gitlab issues created in the Sentry Ui.
Queries
The code in this MR generates this query:
SELECT COUNT(*) FROM "sentry_issues"