Skip to content

Commit

Permalink
Explicitly catch errors we expect when determinig if SQS triggered La…
Browse files Browse the repository at this point in the history
…mbda
  • Loading branch information
NathanielRN committed Oct 28, 2021
1 parent e28aca5 commit 5bf66d2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def _instrumented_lambda_handler_call(
try:
if lambda_event["Records"][0]["eventSource"] == "aws:sqs":
span_kind = SpanKind.CONSUMER
except Exception: # pylint: disable=broad-except
except (IndexError, KeyError, TypeError):
span_kind = SpanKind.SERVER

tracer = get_tracer(__name__, __version__, tracer_provider)
Expand Down

0 comments on commit 5bf66d2

Please sign in to comment.