sentry icon indicating copy to clipboard operation
sentry copied to clipboard

feat(uptime): Add url_domain and url_suffix columns to the uptime subscription model

Open wedamija opened this issue 1 year ago • 1 comments

This adds url_domain and url_suffix to the uptime subscription model. The plan is to store the domainof each url here for use in limiting total number of checks per domain

We'll use url_suffix to understand how many customers are using a specific host, which can be useful for analytics and potentially for large downtime detection.

wedamija avatar Aug 16 '24 22:08 wedamija

This PR has a migration; here is the generated SQL for src/sentry/uptime/migrations/0008_uptime_url_suffix.py ()

--
-- Custom state/database change combination
--

                    ALTER TABLE "uptime_uptimesubscription" ADD COLUMN "url_domain" character varying(255) NOT NULL DEFAULT '';
                    

                    ALTER TABLE "uptime_uptimesubscription" ADD COLUMN "url_domain_suffix" character varying(255) NOT NULL DEFAULT '';
                    

                    ALTER TABLE "uptime_uptimesubscription" ADD COLUMN "host_whois_orgname" character varying(255) NOT NULL DEFAULT '';
                    

                    ALTER TABLE "uptime_uptimesubscription" ADD COLUMN "host_whois_orgid" character varying(255) NOT NULL DEFAULT '';

github-actions[bot] avatar Aug 16 '24 22:08 github-actions[bot]