-
Notifications
You must be signed in to change notification settings - Fork 421
Error calling decorated function from another decorated function #32
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
Comments
Thanks for reporting it Tom! I created a test and reproduced it successfully. I couldn't find a reliable fix for that yet - I'll keep on trying and report back once I have some any good news |
hey Tom @cakepietoast - Could you try Tests passed, and also tested with a deployed Lambda fn using the same code - just want to be triple sure before I commit to CHANGELOG. |
@heitorlessa working fine now, thanks for the quick fix! |
* develop: (21 commits) bugfix: #32 Runtime Error for nested sync fns chore: renamed history to changelog dependabot bugfix: resolves #31 aiohttp lazy import chore: grammar issues improv: add project tenets Improv tracer - async support, patch, test coverage and X-Ray escape hatch (#29) Bugfix: "per second" metric units (#27) fix: #24 correct example test and docs chore: bump example to use 0.8.0 features Adopt logging best practices (#23) Decorator factory Feat: Create your own middleware (#17) chore: clean up CI workflows fix: CI attempt 4 fix: CI attempt 3 fix: CI attempt 3 fix: CI attempt 2 feat: add docs to CI chore: fix github badge typo chore: pypi monthly download badge fix: add missing single_metric example; test var name ...
When decorating multiple functions with Tracer.capture_method(), a RuntimeError is thrown if one of those methods contains a call to the other as it tries to run an event loop which is already running.
The offending code is here: https://github.com/awslabs/aws-lambda-powertools/blob/develop/python/aws_lambda_powertools/tracing/tracer.py#L454
To reproduce:
The text was updated successfully, but these errors were encountered: