Skip to content

Commit 7ceeb42

Browse files
committed
bugfix: error metrics should be sent during exception handling
Signed-off-by: Joey Zhao <5253430+joeyzhao2018@users.noreply.github.com>
1 parent b08b763 commit 7ceeb42

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

datadog_lambda/wrapper.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,9 @@ def __call__(self, event, context, **kwargs):
165165
self.response = self.func(event, context, **kwargs)
166166
return self.response
167167
except Exception:
168-
if not should_use_extension:
169-
from datadog_lambda.metric import submit_errors_metric
168+
from datadog_lambda.metric import submit_errors_metric
170169

171-
submit_errors_metric(context)
170+
submit_errors_metric(context)
172171

173172
if self.span:
174173
self.span.set_traceback()

0 commit comments

Comments
 (0)