but the code will just check eventSource(which applicable in sqs, s3 and dynamodb) but not EventSource. So I add code to check the EventSource, make sure the SNS's span id will be SpanKind.CONSUMER but not SpanKind.SERVER
Type of change
Please delete options that are not relevant.
[x] Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
tox -e py39-test-instrumentation-aws-lambda
Does This PR Require a Core Repo Change?
[x] No.
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.
…tion library.
Description
Fixes #2511
In AWS doc: https://docs.aws.amazon.com/lambda/latest/dg/with-sns.html, The SNS message event looks like:
but the code will just check eventSource(which applicable in sqs, s3 and dynamodb) but not EventSource. So I add code to check the EventSource, make sure the SNS's span id will be SpanKind.CONSUMER but not SpanKind.SERVER
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
tox -e py39-test-instrumentation-aws-lambda
Does This PR Require a Core Repo Change?
Checklist:
See contributing.md for styleguide, changelog guidelines, and more.