Skip to content

Commit 495c770

Browse files
authored
bugfix: error metrics should be sent during exception handling (#626)
Signed-off-by: Joey Zhao <5253430+joeyzhao2018@users.noreply.github.com>
1 parent 555ed5b commit 495c770

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
@@ -166,10 +166,9 @@ def __call__(self, event, context, **kwargs):
166166
self.response = self.func(event, context, **kwargs)
167167
return self.response
168168
except Exception:
169-
if not should_use_extension:
170-
from datadog_lambda.metric import submit_errors_metric
169+
from datadog_lambda.metric import submit_errors_metric
171170

172-
submit_errors_metric(context)
171+
submit_errors_metric(context)
173172

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

0 commit comments

Comments
 (0)