-
Notifications
You must be signed in to change notification settings - Fork 144
Lazy load samplers to speed up coldstart in a Lambda environment #312
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 tasks
👋 @NathanielRN, did you have a chance to look at it? |
wangzlei
approved these changes
Aug 25, 2021
woot! |
mergify bot
referenced
this pull request
in aws-powertools/powertools-lambda-python
Dec 8, 2021
Bumps [aws-xray-sdk](https://github.com/aws/aws-xray-sdk-python) from 2.8.0 to 2.9.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/aws/aws-xray-sdk-python/releases">aws-xray-sdk's releases</a>.</em></p> <blockquote> <h2>2.9.0 Release</h2> <p>See details in <a href="https://github.com/aws/aws-xray-sdk-python/blob/master/CHANGELOG.rst">CHANGELOG</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/aws/aws-xray-sdk-python/blob/master/CHANGELOG.rst">aws-xray-sdk's changelog</a>.</em></p> <blockquote> <h1>2.9.0</h1> <ul> <li>bugfix: Change logging behavior to avoid overflow. <code>PR302 <https://github.com/aws/aws-xray-sdk-python/pull/302></code>_.</li> <li>improvement: Lazy load samplers to speed up cold start in lambda. <code>PR312 <https://github.com/aws/aws-xray-sdk-python/pull/312></code>_.</li> <li>improvement: Replace slow json file name resolver. <code>PR 306 <https://github.com/aws/aws-xray-sdk-python/pull/306></code>_.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/aws/aws-xray-sdk-python/commit/be4dea2f89e44dd52c68b23e1620b8541947e64b"><code>be4dea2</code></a> Release commit for v2.9.0 (<a href="https://github-redirect.dependabot.com/aws/aws-xray-sdk-python/issues/318">#318</a>)</li> <li><a href="https://github.com/aws/aws-xray-sdk-python/commit/9858cab26dd87b26cfbec852449cfcfc9be4d73c"><code>9858cab</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/aws/aws-xray-sdk-python/issues/317">#317</a> from wangzlei/master</li> <li><a href="https://github.com/aws/aws-xray-sdk-python/commit/85d8801d7b00ce3b97ede94e3181db5ebe7ad09d"><code>85d8801</code></a> Remove redundant error log MISSING_SEGMENT_MSG</li> <li><a href="https://github.com/aws/aws-xray-sdk-python/commit/05f5e8f7ab7b17c5f9f80ac01c97712a8737ceed"><code>05f5e8f</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/aws/aws-xray-sdk-python/issues/315">#315</a> from aws/willarmiros-patch-1</li> <li><a href="https://github.com/aws/aws-xray-sdk-python/commit/e1841e668a46b0da7b83e5fdf0bb231cedf2dfb3"><code>e1841e6</code></a> Create CODEOWNERS</li> <li><a href="https://github.com/aws/aws-xray-sdk-python/commit/0e1f935bd2040ee7dbf0625db7f7ad780c66fb37"><code>0e1f935</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/aws/aws-xray-sdk-python/issues/312">#312</a> from maxday/maxday/lazy-load-samplers</li> <li><a href="https://github.com/aws/aws-xray-sdk-python/commit/f4b33f0920a28d87a59979e1262b5511c80a6dfd"><code>f4b33f0</code></a> lazy load samplers</li> <li><a href="https://github.com/aws/aws-xray-sdk-python/commit/86248a528a43a1cab2c5ff50056eb01f3ff8d8a6"><code>86248a5</code></a> Merge pull request <a href="https://github-redirect.dependabot.com/aws/aws-xray-sdk-python/issues/306">#306</a> from NathanielRN/remove-slow-filepath-resolve</li> <li><a href="https://github.com/aws/aws-xray-sdk-python/commit/aa4b2f5827bcfdf6039753cd547fcb34611684c9"><code>aa4b2f5</code></a> Benchmark tests should both consistently return</li> <li><a href="https://github.com/aws/aws-xray-sdk-python/commit/8ad460eb5a6de440939f5ce22cfc01ac7cca7613"><code>8ad460e</code></a> Add benchmarks for json read</li> <li>Additional commits viewable in <a href="https://github.com/aws/aws-xray-sdk-python/compare/2.8.0...2.9.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #311
Description of changes:
This PR lazy loads DefaultSampler and LocalSampler depending whether or not we are in a Lambda environment.
This prevent both files to be imported.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.