👋 Hello team!
Both LocalSampler and DefaultSampler are mutually exclusive and cannot be used at the same in core/recorder.py
The fact that they are both imported at the very beginning of the file slows down cold start when using this SDK in a Lambda function.
DefaultSampler is quite slow to load and counts for about 6% of the cold start duration in our use case (see the detailed flame graph attached, purple section)
I will propose a PR to delay import in if/else so DefaultSampler won't be loading while using in Lambda.

👋 Hello team!
Both
LocalSamplerandDefaultSamplerare mutually exclusive and cannot be used at the same incore/recorder.pyThe fact that they are both imported at the very beginning of the file slows down cold start when using this SDK in a Lambda function.
DefaultSampler is quite slow to load and counts for about 6% of the cold start duration in our use case (see the detailed flame graph attached, purple section)
I will propose a PR to delay import in if/else so DefaultSampler won't be loading while using in Lambda.