-
Notifications
You must be signed in to change notification settings - Fork 429
feat: add tracer support for async, escape hatch, and patch given modules #29
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
Merged
Changes from 27 commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
5e2a022
feat: use new TraceProvider
heitorlessa 63a8ea9
improv: update tests
heitorlessa e3fddaf
improv: update docs, linting
heitorlessa 5ba54a8
improv: docstring readability and links
heitorlessa 0adc7a7
improv: remove tracer provider
heitorlessa 46a11a2
fix: patch modules type
heitorlessa c72e37c
improv: use client ctx_manager for race conditions
heitorlessa 022c373
improv: make disabling provider private again
heitorlessa e038a72
chore: linting
heitorlessa f585506
fix: race condition annotation/metadata
heitorlessa be69d4f
chore: linting
heitorlessa 9e99f8c
feat: add async support for methods
heitorlessa 9e7bd6d
improv: document async use cases, and edge cases
heitorlessa f79edff
improv: upgrade xray, flex pinning
heitorlessa 4b22f75
chore: linting
heitorlessa 44dbab6
improv: update example for async, escape hatch
heitorlessa 107f572
fix: add example dev deps in project
heitorlessa fbfc759
improv: add patch_modules example, formatting
heitorlessa b3447e3
improv: break down concurrent async calls example
heitorlessa c87bf62
docs: main doc clean up
heitorlessa e1b79ea
docs: document async, escape hatch usage
heitorlessa c58a4f1
chore: lint
heitorlessa c91fe32
docs: update example SAM template comments
heitorlessa 7f0c59c
chore: updates poetry lock file
heitorlessa 252e35b
improv: example to use py 3.8
heitorlessa adb244e
fix: AsyncMockMixin not being awaitable in 3.8
heitorlessa ea38254
fix: 3.8 defaulting to AsyncMock
heitorlessa b7507e4
improv: include x-ray bug for concurrent async calls
heitorlessa b8ed79f
fix: address nicolas's feedback
heitorlessa b767567
improv: add security baseline as part of PR process
heitorlessa 3ddcf16
improv: enforce lower code complexity
heitorlessa a5407d5
chore: whitespace
heitorlessa 7647193
improv: add complexity baseline
heitorlessa 238a401
chore: bump version to 0.9.0
heitorlessa 8fa07e6
chore: clean up history changes
heitorlessa ffe7c97
Merge branch 'develop' into improv/tracer
heitorlessa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
class MetricUnitError(Exception): | ||
"""When metric unit is not supported by CloudWatch""" | ||
|
||
pass | ||
|
||
|
||
class SchemaValidationError(Exception): | ||
"""When serialization fail schema validation""" | ||
|
||
pass | ||
|
||
|
||
class MetricValueError(Exception): | ||
"""When metric value isn't a valid number""" | ||
|
||
pass | ||
|
||
|
||
class UniqueNamespaceError(Exception): | ||
"""When an additional namespace is set""" | ||
|
||
pass |
2 changes: 2 additions & 0 deletions
2
python/aws_lambda_powertools/middleware_factory/exceptions.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
class MiddlewareInvalidArgumentError(Exception): | ||
"""When middleware receives non keyword=arguments""" | ||
|
||
pass |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
"""Tracing utility | ||
""" | ||
from aws_xray_sdk.ext.aiohttp.client import aws_xray_trace_config as aiohttp_trace_config | ||
|
||
from .tracer import Tracer | ||
|
||
__all__ = ["Tracer"] | ||
__all__ = ["Tracer", "aiohttp_trace_config"] |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.