What were you trying to accomplish?
I am have my shared code include @tracer but i don't want to double patch boto3 etc..
Expected Behavior
tracer = Tracer(auto_patch=False) should not disable patching in the main lambda handler
Current Behavior
When i go into the console now of the boto3 activity appears
# main.py
from aws_lambda_powertools import Tracer
from app import shared
tracer = Tracer(service="payment")
@tracer.capture_lambda_handler
def handler(event, context):
pass
# shared.py
from aws_lambda_powertools import Tracer
tracer = Tracer(auto_patch=False)
Possible Solution
I think because the shared.py - tracer = Tracer(auto_patch=False) code is called before the main.py. The patching has already been disabled.
Environment
- Powertools version used: 1.1.1
What were you trying to accomplish?
I am have my shared code include
@tracerbut i don't want to double patch boto3 etc..Expected Behavior
tracer = Tracer(auto_patch=False)should not disable patching in the main lambda handlerCurrent Behavior
When i go into the console now of the boto3 activity appears
Possible Solution
I think because the shared.py -
tracer = Tracer(auto_patch=False)code is called before the main.py. The patching has already been disabled.Environment