-
Notifications
You must be signed in to change notification settings - Fork 409
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
Bug: POWERTOOLS_TRACE_DISABLED=true environment variable does not disable tracing #1898
Comments
Hi @mobal, thanks for opening this issue and giving us an opportunity to hear from the customer about what is unclear in our documentation. Let's try to clarify how this env "POWERTOOLS_TRACE_DISABLED" works. This option is handy when you are running your code outside from Lambda Runtime, I mean, in your local environment when you run
I deployed your code here and if you check the tracer sent to XRay it is not the tracer of your lambda_handler function, but the automatic tracer that Lambda sends to XRAY. We can't disable this in Powertools because it's part of Lambda Runtime. If you remove the We can summarize it all this way:
This issue will help us improve our documentation and make this clearer. Would you like to send us a PR to make our documentation clearer for this? |
Now I fully understand how it works, and in this case it is not a bug! Unfortunately, I haven't been using X-Ray for a long time. I will try to complete the relevant part of the documentation, and when I am done I will send a PR! Thanks for the help! |
|
Expected Behaviour
Setting the POWERTOOLS_TRACE_DISABLED environment variable to true disables tracing at runtime.
Current Behaviour
Setting the POWERTOOLS_TRACE_DISABLED environment variable to true does not disables tracing at runtime. Log entry is generated but it still works.
Code snippet
Possible Solution
No response
Steps to Reproduce
AWS Lambda Powertools for Python version
2.7.1
AWS Lambda function runtime
3.9
Packaging format used
Lambda Layers
Debugging logs
The text was updated successfully, but these errors were encountered: