From 55e8d9ad95442eeb30132403effa5f4033c8418f Mon Sep 17 00:00:00 2001 From: James Cunningham Date: Wed, 3 Jul 2019 16:13:37 -0700 Subject: [PATCH] obs(sentry_apps): Add a small metrics increment on processing resource changes. --- src/sentry/tasks/sentry_apps.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/sentry/tasks/sentry_apps.py b/src/sentry/tasks/sentry_apps.py index 94ceadfd83d8..5ea682e36e6d 100644 --- a/src/sentry/tasks/sentry_apps.py +++ b/src/sentry/tasks/sentry_apps.py @@ -10,6 +10,7 @@ from sentry import features from sentry.http import safe_urlopen from sentry.tasks.base import instrumented_task, retry +from sentry.utils import metrics from sentry.utils.http import absolute_uri from sentry.api.serializers import serialize, AppPlatformEvent from sentry.models import ( @@ -201,6 +202,14 @@ def _process_resource_change(action, sender, instance_id, retryer=None, *args, * data[name] = serialize(instance) send_webhooks(installation, event, data=data) + metrics.incr( + 'resource_change.processed', + sample_rate=1.0, + tags={ + 'change_event': event, + } + ) + @instrumented_task('sentry.tasks.process_resource_change', **TASK_OPTIONS) @retry()