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

[ERROR] UnboundLocalError: local variable 'span_kind' referenced before assignment #238

Closed
M3gar00 opened this issue Mar 16, 2022 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@M3gar00
Copy link

M3gar00 commented Mar 16, 2022

Issue Type: Bug

I get the following error when I attempt to run a lambda with the aws-otel-lambda layer activated. The ARN of the layer is: arn:aws:lambda:${var.aws_region}:901920570463:layer:aws-otel-python38-amd64-ver-1-9-1:2

The full error message I get is:

[ERROR] UnboundLocalError: local variable 'span_kind' referenced before assignment
Traceback (most recent call last):
  File "/opt/python/wrapt/wrappers.py", line 578, in __call__
    return self._self_wrapper(self.__wrapped__, self._self_instance,
  File "/opt/python/opentelemetry/instrumentation/aws_lambda/__init__.py", line 203, in _instrumented_lambda_handler_call
    kind=span_kind,
@Kausik-A Kausik-A added the bug Something isn't working label Mar 16, 2022
@bryan-aguilar
Copy link
Contributor

Could you provide any additional code example?

@M3gar00
Copy link
Author

M3gar00 commented Mar 21, 2022

I'm not sure what code example I can provide; I do not have access to the code from which this error is being emitted. I used AWS resources to implement this as an Auto-Instrumented layer on my Lambda application.

@sungwonh
Copy link

This issue is resolved, but not released yet.
open-telemetry/opentelemetry-python-contrib#926

@vasireddy99 vasireddy99 self-assigned this Mar 23, 2022
@sungwonh
Copy link

@vasireddy99
Could you let me know when a version that fixes this issue will be released?

@vasireddy99
Copy link
Contributor

vasireddy99 commented Mar 31, 2022

Hi @sungwonh Thanks for reaching out, I have checked with the opentelemetry-python-contrib maintainers through the CNCF slack channel. We may expect the new release with the fix by end of next month. Once the v0.30b.0 release is available. We can update the dependencies in OpenTelemetry-lambda and follows the lambda layer release. I will update info here if there are any changes as we go on :-)

@juanitosvq
Copy link

Hi @vasireddy99, looks like v0.30b1 of opentelemetry-python-contrib is already available. Any plans on releasing a new layer with the fix for this? Thanks!

@vasireddy99
Copy link
Contributor

vasireddy99 commented May 2, 2022

Hi @juanitosvq , The lambda layers with this fix are expected to be available in May. shall provide more updates as we go on.

@M3gar00
Copy link
Author

M3gar00 commented May 19, 2022

@vasireddy99 -- It looks like the fix is not yet in for this. Am I missing something?

@vasireddy99
Copy link
Contributor

vasireddy99 commented May 19, 2022

HI @M3gar00, Please expect the fix to be available with the new lambda layers which are expected to released in this month.

@vasireddy99
Copy link
Contributor

vasireddy99 commented May 25, 2022

Update : The lambda Layer with OTel python 1.11.1 that includes the fix for this issue is available.

@TriQuach
Copy link

@vasireddy99 The new OTel lambda layer is working from our side, and the problem has been fixed! Thanks for fixing the issue 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants