service_metrics/Sentry: KeyError: type

Since Jan 26, the Sentry API has started failing from a missing key issue["metadata"]["type"]

# cki/cki_tools/service_metrics/metrics/sentry.py in update_project_issues at line 99

        # Only get issues which have occurred in the last 24 hours.
        issues = self._apis[instance_url].get_project_issues(project['id'], stats_period='24h')
        for issue in issues:
            # The issue['title'] is truncated; this way we get the whole thing.
            title = f'{issue["metadata"]["type"]}: {issue["metadata"]["value"]}'
            counter = self.metric_sentry_issue_event_count.labels(

Jira: CKI-6525

Edited by Tales da Aparecida