-
Notifications
You must be signed in to change notification settings - Fork 606
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
opentelemetry-instrumentation-aws-lambda: code does not handle lack of expected environment variables #2744
Comments
I'd like to work on this and submit a PR later |
I was seeing the same behaviour even without explicitly installing the It got installed after I ran However as I don't have any AWS Lambda dependencies (like Kyle) I was able to remove it using It's certainly not the solution, but works as a temporary workaround at least for me. |
I think in general you should just not install the aws-lambda instrumentation, or if you need to use the bootstrap command, simply add aws-lambda to https://opentelemetry.io/docs/zero-code/python/configuration/#disabling-specific-instrumentations Here is the link to the entry point where you can see what name to add to that env var: opentelemetry-python-contrib/instrumentation/opentelemetry-instrumentation-aws-lambda/pyproject.toml Line 37 in dbfa681
|
Preface: I should've been more clear in the issue that I ran into the problem by using the bootstrap @mlorenzana While that suffices as a workaround, I don't think it is the right approach. Additionally, say another default instrumentation gets added for e.g. Google Cloud functions or such, should everyone using opentelemetry be required to add that to the disabled instrumentation list? |
@Kyle-sandeman-mrdfood I'll bring this discussion to the next SIG so we can vote to remove the aws-lambda from the defaults. Meanwhile, could you please take a look at the PR that will address part of the issue #2750 ? |
Describe your environment
OS: Docker (python3.12)
Python version: (e.g., Python 3.12.1)
Package version: (e.g., 0.48.0)
What happened?
Please note that my application is NOT a Lambda or related in any way. I only have this package because it is a default in the bootstrap.
Steps to Reproduce
One could instead run
opentelemetry-bootstrap -a install
, I presume.opentelemetry-instrument python -c "print('test')"
Expected Result
Actual Result
Additional context
While this does not affect the application itself, it may affect whether tracing gets set up properly.
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: