Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lambdas triggered from dynamodb are failing #902

Closed
cowfoodbagman opened this issue Feb 4, 2022 · 2 comments · Fixed by #926
Closed

lambdas triggered from dynamodb are failing #902

cowfoodbagman opened this issue Feb 4, 2022 · 2 comments · Fixed by #926
Assignees
Labels
bug Something isn't working instrumentation

Comments

@cowfoodbagman
Copy link

cowfoodbagman commented Feb 4, 2022

When lambdas are triggered from dyanmodb messages the event will look like {"Records": [{"eventSource": "aws:dynamodb" ...}]}
https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html
As a result, I am seeing these error messages:

[ERROR] UnboundLocalError: local variable 'span_kind' referenced before assignment
Traceback (most recent call last):
  File "/opt/python/opentelemetry/instrumentation/aws_lambda/__init__.py", line 203, in _instrumented_lambda_handler_call
    kind=span_kind,

https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/instrumentation/opentelemetry-instrumentation-aws-lambda/src/opentelemetry/instrumentation/aws_lambda/__init__.py#L192-L196

@owais owais added bug Something isn't working help wanted Extra attention is needed instrumentation labels Feb 5, 2022
@brett-bim
Copy link
Contributor

brett-bim commented Feb 14, 2022

Also seeing this with s3 events. I assume that code linked above should be more expansive to allow for different events sources. I'd be happy to submit a PR that at least included S3, Dynamo and maybe SNS. Would that be appropriate?

@srikanthccv
Copy link
Member

Thanks @brett-bim

@srikanthccv srikanthccv removed the help wanted Extra attention is needed label Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working instrumentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants