fix(monitors): Remove monitor context when appropriate
diff --git a/src/sentry/utils/monitors.py b/src/sentry/utils/monitors.py
index df8b48cd2be3c..5dab770b20951 100644
--- a/src/sentry/utils/monitors.py
+++ b/src/sentry/utils/monitors.py
@@ -59,16 +59,19 @@ def inner(*a, **k):
 
 @suppress_errors
 def report_monitor_begin(task, **kwargs):
+    monitor_id = task.request.headers.get('X-Sentry-Monitor')
+    with configure_scope() as scope:
+        if monitor_id:
+            scope.set_context('monitor', {'id': monitor_id})
+        else:
+            scope.remove_context('monitor')
+
     if not SENTRY_DSN or not API_ROOT:
         return
 
-    monitor_id = task.request.headers.get('X-Sentry-Monitor')
     if not monitor_id:
         return
 
-    with configure_scope() as scope:
-        scope.set_context('monitor', {'id': monitor_id})
-
     session = SafeSession()
     req = session.post(u'{}/api/0/monitors/{}/checkins/'.format(API_ROOT, monitor_id), headers={
         'Authorization': u'DSN {}'.format(SENTRY_DSN)
@@ -82,6 +85,9 @@ def report_monitor_begin(task, **kwargs):
 
 @suppress_errors
 def report_monitor_complete(task, retval, **kwargs):
+    with configure_scope() as scope:
+        scope.remove_context('monitor')
+
     if not SENTRY_DSN or not API_ROOT:
         return
 
