|
35 | 35 |
|
36 | 36 | BUNDLE_ANALYSIS_UPLOAD_VIEWS_COUNTER = Counter( |
37 | 37 | "bundle_analysis_upload_views_runs", |
38 | | - "Number of times a raw report processor was run and with what result", |
| 38 | + "Number of times a BA upload was run and with what result", |
39 | 39 | [ |
40 | 40 | "agent", |
41 | 41 | "version", |
@@ -80,21 +80,14 @@ def get_exception_handler(self) -> Callable: |
80 | 80 | return repo_auth_custom_exception_handler |
81 | 81 |
|
82 | 82 | def post(self, request: HttpRequest) -> Response: |
83 | | - try: |
84 | | - labels = generate_upload_sentry_metrics_tags( |
85 | | - action="bundle_analysis", |
86 | | - endpoint="bundle_analysis", |
87 | | - request=self.request, |
88 | | - is_shelter_request=self.is_shelter_request(), |
89 | | - position="start", |
90 | | - ) |
91 | | - BUNDLE_ANALYSIS_UPLOAD_VIEWS_COUNTER.labels(**labels).inc() |
92 | | - except Exception: |
93 | | - log.warn( |
94 | | - "Failed to BUNDLE_ANALYSIS_UPLOAD_VIEWS_COUNTER", |
95 | | - exc_info=True, |
96 | | - extra=labels, |
97 | | - ) |
| 83 | + labels = generate_upload_sentry_metrics_tags( |
| 84 | + action="bundle_analysis", |
| 85 | + endpoint="bundle_analysis", |
| 86 | + request=self.request, |
| 87 | + is_shelter_request=self.is_shelter_request(), |
| 88 | + position="start", |
| 89 | + ) |
| 90 | + BUNDLE_ANALYSIS_UPLOAD_VIEWS_COUNTER.labels(**labels).inc() |
98 | 91 |
|
99 | 92 | serializer = UploadSerializer(data=request.data) |
100 | 93 | if not serializer.is_valid(): |
@@ -174,21 +167,14 @@ def post(self, request: HttpRequest) -> Response: |
174 | 167 | task_arguments=task_arguments, |
175 | 168 | ), |
176 | 169 | ) |
177 | | - try: |
178 | | - labels = generate_upload_sentry_metrics_tags( |
179 | | - action="bundle_analysis", |
180 | | - endpoint="bundle_analysis", |
181 | | - request=self.request, |
182 | | - is_shelter_request=self.is_shelter_request(), |
183 | | - position="end", |
184 | | - ) |
185 | | - BUNDLE_ANALYSIS_UPLOAD_VIEWS_COUNTER.labels(**labels).inc() |
186 | | - except Exception: |
187 | | - log.warn( |
188 | | - "Failed to BUNDLE_ANALYSIS_UPLOAD_VIEWS_COUNTER", |
189 | | - exc_info=True, |
190 | | - extra=labels, |
191 | | - ) |
| 170 | + labels = generate_upload_sentry_metrics_tags( |
| 171 | + action="bundle_analysis", |
| 172 | + endpoint="bundle_analysis", |
| 173 | + request=self.request, |
| 174 | + is_shelter_request=self.is_shelter_request(), |
| 175 | + position="end", |
| 176 | + ) |
| 177 | + BUNDLE_ANALYSIS_UPLOAD_VIEWS_COUNTER.labels(**labels).inc() |
192 | 178 |
|
193 | 179 | dispatch_upload_task( |
194 | 180 | task_arguments, |
|
0 commit comments