@@ -213,7 +213,8 @@ def test_doesnt_update_status_if_not_superuser(self):
213213 self .updater .run (self .user )
214214 assert self .sentry_app .status == SentryAppStatus .UNPUBLISHED
215215
216- def test_create_service_hook_on_update (self ):
216+ @patch ("sentry.integrations.utils.metrics.EventLifecycle.record_event" )
217+ def test_create_service_hook_on_update (self , mock_record ):
217218 self .create_project (organization = self .org )
218219 internal_app = self .create_internal_integration (
219220 name = "Internal" , organization = self .org , webhook_url = None , scopes = ("event:read" ,)
@@ -229,6 +230,17 @@ def test_create_service_hook_on_update(self):
229230 assert service_hook .url == "https://sentry.io/hook"
230231 assert service_hook .events == expand_events (["issue" ])
231232
233+ # SLO assertions
234+ assert_success_metric (mock_record = mock_record )
235+
236+ # APP_CREATE (success) -> WEBHOOK_UPDATE (success)
237+ assert_count_of_metric (
238+ mock_record = mock_record , outcome = EventLifecycleOutcome .STARTED , outcome_count = 2
239+ )
240+ assert_count_of_metric (
241+ mock_record = mock_record , outcome = EventLifecycleOutcome .SUCCESS , outcome_count = 2
242+ )
243+
232244 def test_delete_service_hook_on_update (self ):
233245 self .create_project (organization = self .org )
234246 internal_app = self .create_internal_integration (
0 commit comments